exception onlinepayments.sdk.api_exception.ApiException(status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str = 'the payment platform returned an error response')[source]

Bases: RuntimeError

Represents an error response from the payment platform which contains an ID and a list of errors.

property error_id: str | None
Returns:

The errorId received from the Payment platform if available.

property errors: Sequence[APIError]
Returns:

The errors received from the Payment platform if available. Never None.

property response_body: str
Returns:

The raw response body that was returned by the Payment platform.

property status_code: int
Returns:

The HTTP status code that was returned by the Payment platform.

exception onlinepayments.sdk.authorization_exception.AuthorizationException(status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str = 'the payment platform returned an authorization error response')[source]

Bases: ApiException

Represents an error response from the payment platform when authorization failed.

__annotations__ = {}
exception onlinepayments.sdk.declined_payment_exception.DeclinedPaymentException(status_code: int, response_body: str, response: PaymentErrorResponse | None)[source]

Bases: DeclinedTransactionException

Represents an error response from a create payment call.

__annotations__ = {}
property create_payment_response: CreatePaymentResponse | None
Returns:

The result of creating a payment if available, otherwise None.

exception onlinepayments.sdk.declined_payout_exception.DeclinedPayoutException(status_code: int, response_body: str, response: PayoutErrorResponse | None)[source]

Bases: DeclinedTransactionException

Represents an error response from a payout call.

__annotations__ = {}
property payout_result: PayoutResult | None
Returns:

The result of creating a payout if available, otherwise None.

exception onlinepayments.sdk.declined_refund_exception.DeclinedRefundException(status_code: int, response_body: str, response: RefundErrorResponse | None)[source]

Bases: DeclinedTransactionException

Represents an error response from a refund call.

__annotations__ = {}
property refund_response: RefundResponse | None
Returns:

The result of creating a refund if available, otherwise None.

exception onlinepayments.sdk.declined_transaction_exception.DeclinedTransactionException(status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str | None = None)[source]

Bases: ApiException

Represents an error response from a create payment, payout or refund call.

__annotations__ = {}
onlinepayments.sdk.exception_factory.create_exception(status_code: int, body: str, error_object: Any, context: CallContext | None) Exception[source]

Return a raisable API exception based on the error object given

exception onlinepayments.sdk.idempotence_exception.IdempotenceException(idempotence_key: str, idempotence_request_timestamp: int, status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str = 'the payment platform returned a duplicate request error response')[source]

Bases: ApiException

Represents an error response from the payment platform when an idempotent request failed because the first request has not finished yet.

__annotations__ = {}
property idempotence_key: str
Returns:

The key that was used for the idempotent request.

property idempotence_request_timestamp: int
Returns:

The request timestamp of the first idempotent request with the same key.

exception onlinepayments.sdk.platform_exception.PlatformException(status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str = 'the payment platform returned an error response')[source]

Bases: ApiException

Represents an error response from the payment platform when something went wrong at the payment platform or further downstream.

__annotations__ = {}
exception onlinepayments.sdk.reference_exception.ReferenceException(status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str = 'the payment platform returned a reference error response')[source]

Bases: ApiException

Represents an error response from the payment platform when a non-existing or removed object is trying to be accessed.

__annotations__ = {}
exception onlinepayments.sdk.validation_exception.ValidationException(status_code: int, response_body: str, error_id: str | None, errors: List[APIError] | None, message: str = 'the payment platform returned an incorrect request error response')[source]

Bases: ApiException

Represents an error response from the payment platform when validation of requests failed.

__annotations__ = {}
class onlinepayments.sdk.domain.account_on_file.AccountOnFile[source]

Bases: DataObject

__annotations__ = {'_AccountOnFile__attributes': typing.Optional[typing.List[onlinepayments.sdk.domain.account_on_file_attribute.AccountOnFileAttribute]], '_AccountOnFile__display_hints': typing.Optional[onlinepayments.sdk.domain.account_on_file_display_hints.AccountOnFileDisplayHints], '_AccountOnFile__id': typing.Optional[str], '_AccountOnFile__payment_product_id': typing.Optional[int]}
property attributes: List[AccountOnFileAttribute] | None

Type: list[onlinepayments.sdk.domain.account_on_file_attribute.AccountOnFileAttribute]

property display_hints: AccountOnFileDisplayHints | None
Object containing information for the client on how best to display this field

Type: onlinepayments.sdk.domain.account_on_file_display_hints.AccountOnFileDisplayHints

from_dictionary(dictionary: dict) AccountOnFile[source]
property id: str | None
ID of the token

Type: str

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.account_on_file_attribute.AccountOnFileAttribute[source]

Bases: DataObject

__annotations__ = {'_AccountOnFileAttribute__key': typing.Optional[str], '_AccountOnFileAttribute__must_write_reason': typing.Optional[str], '_AccountOnFileAttribute__status': typing.Optional[str], '_AccountOnFileAttribute__value': typing.Optional[str]}
from_dictionary(dictionary: dict) AccountOnFileAttribute[source]
property key: str | None
Name of the key or property

Type: str

property must_write_reason: str | None
Deprecated: This field is not used by any payment product The reason why the status is MUST_WRITE. Currently only “IN_THE_PAST” is possible as value (for expiry date), but this can be extended with new values in the future.

Type: str

Deprecated; Deprecated

property status: str | None
Possible values:
  • READ_ONLY - attribute cannot be updated and should be presented in that way to the user

  • CAN_WRITE - attribute can be updated and should be presented as an editable field, for example an expiration date that will expire very soon

  • MUST_WRITE - attribute should be updated and must be presented as an editable field, for example an expiration date that has already expired Any updated values that are entered for CAN_WRITE or MUST_WRITE will be used to update the values stored in the token.

Type: str

to_dictionary() dict[source]
property value: str | None
Value of the key or property

Type: str

class onlinepayments.sdk.domain.account_on_file_display_hints.AccountOnFileDisplayHints[source]

Bases: DataObject

__annotations__ = {'_AccountOnFileDisplayHints__label_template': typing.Optional[typing.List[onlinepayments.sdk.domain.label_template_element.LabelTemplateElement]], '_AccountOnFileDisplayHints__logo': typing.Optional[str]}
from_dictionary(dictionary: dict) AccountOnFileDisplayHints[source]
property label_template: List[LabelTemplateElement] | None
Array of attribute keys and their mask

Type: list[onlinepayments.sdk.domain.label_template_element.LabelTemplateElement]

Partial URL that you can reference for the image of this payment product. You can use our server-side resize functionality by appending ‘?size={{width}}x{{height}}’ to the full URL, where width and height are specified in pixels. The resized image will always keep its correct aspect ratio.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.acquirer_information.AcquirerInformation[source]

Bases: DataObject

__annotations__ = {'_AcquirerInformation__acquirer_selection_information': typing.Optional[onlinepayments.sdk.domain.acquirer_selection_information.AcquirerSelectionInformation], '_AcquirerInformation__name': typing.Optional[str]}
property acquirer_selection_information: AcquirerSelectionInformation | None
Information about the acquirer selection

Type: onlinepayments.sdk.domain.acquirer_selection_information.AcquirerSelectionInformation

from_dictionary(dictionary: dict) AcquirerInformation[source]
property name: str | None
Name of the acquirer used to process the transaction

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.acquirer_selection_information.AcquirerSelectionInformation[source]

Bases: DataObject

__annotations__ = {'_AcquirerSelectionInformation__fallback_level': typing.Optional[int], '_AcquirerSelectionInformation__result': typing.Optional[str], '_AcquirerSelectionInformation__rule_name': typing.Optional[str]}
property fallback_level: int | None
Specifies whether a fallback occurred from the primary choice of the acquirer selection service.

Type: int

from_dictionary(dictionary: dict) AcquirerSelectionInformation[source]
property result: str | None
Result of the acquirer selection operation

Type: str

property rule_name: str | None
Name of the rule used to select the acquirer

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.additional_order_input.AdditionalOrderInput[source]

Bases: DataObject

__annotations__ = {'_AdditionalOrderInput__airline_data': typing.Optional[onlinepayments.sdk.domain.airline_data.AirlineData], '_AdditionalOrderInput__loan_recipient': typing.Optional[onlinepayments.sdk.domain.loan_recipient.LoanRecipient], '_AdditionalOrderInput__lodging_data': typing.Optional[onlinepayments.sdk.domain.lodging_data.LodgingData], '_AdditionalOrderInput__type_information': typing.Optional[onlinepayments.sdk.domain.order_type_information.OrderTypeInformation]}
property airline_data: AirlineData | None
Object that holds airline specific data

Type: onlinepayments.sdk.domain.airline_data.AirlineData

from_dictionary(dictionary: dict) AdditionalOrderInput[source]
property loan_recipient: LoanRecipient | None
Object containing specific data regarding the recipient of a loan in the UK

Type: onlinepayments.sdk.domain.loan_recipient.LoanRecipient

property lodging_data: LodgingData | None
Object that holds lodging specific data

Type: onlinepayments.sdk.domain.lodging_data.LodgingData

to_dictionary() dict[source]
property type_information: OrderTypeInformation | None
Object that holds the purchase and usage type indicators

Type: onlinepayments.sdk.domain.order_type_information.OrderTypeInformation

class onlinepayments.sdk.domain.address.Address[source]

Bases: DataObject

__annotations__ = {'_Address__additional_info': typing.Optional[str], '_Address__city': typing.Optional[str], '_Address__country_code': typing.Optional[str], '_Address__house_number': typing.Optional[str], '_Address__state': typing.Optional[str], '_Address__street': typing.Optional[str], '_Address__zip': typing.Optional[str]}
property additional_info: str | None
Second line of street or additional address information

Type: str

property city: str | None
City

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

from_dictionary(dictionary: dict) Address[source]
property house_number: str | None
House number

Type: str

property state: str | None
ISO 3166-2 country subdivision code

Type: str

property street: str | None
Street name

Type: str

to_dictionary() dict[source]
property zip: str | None
Zip code

Type: str

class onlinepayments.sdk.domain.address_personal.AddressPersonal[source]

Bases: DataObject

__annotations__ = {'_AddressPersonal__additional_info': typing.Optional[str], '_AddressPersonal__city': typing.Optional[str], '_AddressPersonal__company_name': typing.Optional[str], '_AddressPersonal__country_code': typing.Optional[str], '_AddressPersonal__house_number': typing.Optional[str], '_AddressPersonal__name': typing.Optional[onlinepayments.sdk.domain.personal_name.PersonalName], '_AddressPersonal__state': typing.Optional[str], '_AddressPersonal__street': typing.Optional[str], '_AddressPersonal__zip': typing.Optional[str]}
property additional_info: str | None
Second line of street or additional address information

Type: str

property city: str | None
City

Type: str

property company_name: str | None
Company Name

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

from_dictionary(dictionary: dict) AddressPersonal[source]
property house_number: str | None
House number

Type: str

property name: PersonalName | None
Object containing the name details of the customer

Type: onlinepayments.sdk.domain.personal_name.PersonalName

property state: str | None
ISO 3166-2 country subdivision code

Type: str

property street: str | None
Street name

Type: str

to_dictionary() dict[source]
property zip: str | None
Zip code

Type: str

class onlinepayments.sdk.domain.airline_data.AirlineData[source]

Bases: DataObject

__annotations__ = {'_AirlineData__agent_numeric_code': typing.Optional[str], '_AirlineData__code': typing.Optional[str], '_AirlineData__flight_date': typing.Optional[str], '_AirlineData__flight_indicator': typing.Optional[str], '_AirlineData__flight_legs': typing.Optional[typing.List[onlinepayments.sdk.domain.airline_flight_leg.AirlineFlightLeg]], '_AirlineData__invoice_number': typing.Optional[str], '_AirlineData__is_e_ticket': typing.Optional[bool], '_AirlineData__is_restricted_ticket': typing.Optional[bool], '_AirlineData__is_third_party': typing.Optional[bool], '_AirlineData__issue_date': typing.Optional[str], '_AirlineData__merchant_customer_id': typing.Optional[str], '_AirlineData__name': typing.Optional[str], '_AirlineData__passenger_name': typing.Optional[str], '_AirlineData__passengers': typing.Optional[typing.List[onlinepayments.sdk.domain.airline_passenger.AirlinePassenger]], '_AirlineData__place_of_issue': typing.Optional[str], '_AirlineData__pnr': typing.Optional[str], '_AirlineData__point_of_sale': typing.Optional[str], '_AirlineData__pos_city_code': typing.Optional[str], '_AirlineData__ticket_currency': typing.Optional[str], '_AirlineData__ticket_delivery_method': typing.Optional[str], '_AirlineData__ticket_number': typing.Optional[str], '_AirlineData__total_fare': typing.Optional[int], '_AirlineData__total_fee': typing.Optional[int], '_AirlineData__total_taxes': typing.Optional[int], '_AirlineData__travel_agency_name': typing.Optional[str]}
property agent_numeric_code: str | None
Numeric code identifying the agent This field is used by the following payment products: 840

Type: str

property code: str | None
Airline numeric code This field is used by the following payment products: 840

Type: str

property flight_date: str | None
Deprecated: This field is not used by any payment product Date of the Flight Format: YYYYMMDD

Type: str

Deprecated; This field is not used by any payment product Date of the Flight Format: YYYYMMDD

property flight_indicator: str | None
Indicator representing the type of flight on the itinerary.

Type: str

property flight_legs: List[AirlineFlightLeg] | None
Object that holds the data on the individual legs of the flight ticket

Type: list[onlinepayments.sdk.domain.airline_flight_leg.AirlineFlightLeg]

from_dictionary(dictionary: dict) AirlineData[source]
property invoice_number: str | None
Airline tracing number This field is used by the following payment products: cards

Type: str

property is_e_ticket: bool | None
Deprecated: This field is not used by any payment product
  • true = The ticket is an E-Ticket

  • false = the ticket is not an E-Ticket’

Type: bool

Deprecated; Deprecated

property is_restricted_ticket: bool | None
Indicates if the ticket is refundable or not.
  • true - Restricted, the ticket is non-refundable

  • false - No restrictions, the ticket is (partially) refundable This field is used by the following payment products: 840

Type: bool

property is_third_party: bool | None
Deprecated: This field is not used by any payment product
  • true - The payer is the ticket holder

  • false - The payer is not the ticket holder

Type: bool

Deprecated; This field is not used by any payment product * true - The payer is the ticket holder * false - The payer is not the ticket holder

property issue_date: str | None
This is the date of issue recorded in the airline system In a case of multiple issuances of the same ticket to a cardholder, you should use the last ticket date. Format: YYYYMMDD This field is used by the following payment products: cards, 840

Type: str

property merchant_customer_id: str | None
Your ID of the customer in the context of the airline data This field is used by the following payment products: 840

Type: str

property name: str | None
Deprecated: This field is not used by any payment product Name of the airline

Type: str

Deprecated; This field is not used by any payment product Name of the airline

property passenger_name: str | None
Deprecated: Use passengers instead Name of passenger

Type: str

Deprecated; Use passengers instead Name of passenger

property passengers: List[AirlinePassenger] | None
Object that holds the data on the individual passengers This field is used by the following payment products: cards, 840

Type: list[onlinepayments.sdk.domain.airline_passenger.AirlinePassenger]

property place_of_issue: str | None
Deprecated: This field is not used by any payment product Place of issue For sales in the US the last two characters (pos 14-15) must be the US state code.

Type: str

Deprecated; This field is not used by any payment product Place of issue For sales in the US the last two characters (pos 14-15) must be the US state code.

property pnr: str | None
*Deprecated*. Use passengers instead.

Type: str

Deprecated; Use passengers instead.

property point_of_sale: str | None
IATA point of sale name This field is used by the following payment products: 840

Type: str

property pos_city_code: str | None
Deprecated: This field is not used by any payment product City code of the point of sale

Type: str

Deprecated; This field is not used by any payment product City code of the point of sale

property ticket_currency: str | None
Three-letter ISO currency code representing the currency in which ticket purchase amount is expressed.

Type: str

property ticket_delivery_method: str | None
Deprecated: This field is not used by any payment product Delivery method of the ticket

Type: str

Deprecated; This field is not used by any payment product Delivery method of the ticket

property ticket_number: str | None
The ticket or document number contains:
  • Airline code: 3-digit airline code number

  • Form code: A maximum of 3 digits indicating the type of document, the source of issue and the number of coupons it contains

  • Serial number: A maximum of 8 digits allocated on a sequential basis, provided that the total number of digits allocated to the form code and serial number shall not exceed ten

  • TICKETNUMBER can be replaced with PNR if the ticket number is unavailable This field is used by the following payment products: cards, 840

Type: str

to_dictionary() dict[source]
property total_fare: int | None
Total fare for all legs on the ticket, excluding taxes and fees. If multiple tickets are purchased, this is the total fare for all tickets This field is used by the following payment products: 840

Type: int

property total_fee: int | None
Total fee for all legs on the ticket. If multiple tickets are purchased, this is the total fee for all tickets This field is used by the following payment products: 840

Type: int

property total_taxes: int | None
Total taxes for all legs on the ticket. If multiple tickets are purchased, this is the total taxes for all tickets This field is used by the following payment products: 840

Type: int

property travel_agency_name: str | None
Name of the travel agency issuing the ticket. For direct airline integration, leave this property blank This field is used by the following payment products: 840

Type: str

class onlinepayments.sdk.domain.airline_flight_leg.AirlineFlightLeg[source]

Bases: DataObject

__annotations__ = {'_AirlineFlightLeg__airline_class': typing.Optional[str], '_AirlineFlightLeg__arrival_airport': typing.Optional[str], '_AirlineFlightLeg__arrival_time': typing.Optional[str], '_AirlineFlightLeg__carrier_code': typing.Optional[str], '_AirlineFlightLeg__conjunction_ticket': typing.Optional[str], '_AirlineFlightLeg__coupon_number': typing.Optional[str], '_AirlineFlightLeg__date': typing.Optional[str], '_AirlineFlightLeg__departure_time': typing.Optional[str], '_AirlineFlightLeg__endorsement_or_restriction': typing.Optional[str], '_AirlineFlightLeg__exchange_ticket': typing.Optional[str], '_AirlineFlightLeg__fare': typing.Optional[str], '_AirlineFlightLeg__fare_basis': typing.Optional[str], '_AirlineFlightLeg__fee': typing.Optional[int], '_AirlineFlightLeg__flight_number': typing.Optional[str], '_AirlineFlightLeg__leg_fare': typing.Optional[int], '_AirlineFlightLeg__number': typing.Optional[int], '_AirlineFlightLeg__origin_airport': typing.Optional[str], '_AirlineFlightLeg__passenger_class': typing.Optional[str], '_AirlineFlightLeg__stopover_code': typing.Optional[str], '_AirlineFlightLeg__taxes': typing.Optional[int]}
property airline_class: str | None
Reservation Booking Designator This field is used by the following payment products: cards

Type: str

property arrival_airport: str | None
Arrival airport/city code This field is used by the following payment products: 840

Type: str

property arrival_time: str | None
The arrival time in the local time zone Format: HH:MM This field is used by the following payment products: 840

Type: str

property carrier_code: str | None
IATA carrier code This field is used by the following payment products: cards, 840

Type: str

property conjunction_ticket: str | None
Identifying number of a ticket issued to a passenger in conjunction with this ticket and that constitutes a single contract of carriage This field is used by the following payment products: 840

Type: str

property coupon_number: str | None
The coupon number associated with this leg of the trip. A ticket can contain several legs of travel, and each leg of travel requires a separate coupon This field is used by the following payment products: 840

Type: str

property date: str | None
Date of the leg Format: YYYYMMDD This field is used by the following payment products: cards, 840

Type: str

property departure_time: str | None
The departure time in the local time at the departure airport Format: HH:MM This field is used by the following payment products: 840

Type: str

property endorsement_or_restriction: str | None
An endorsement can be an agency-added notation or a mandatory government required notation, such as value-added tax. A restriction is a limitation based on the type of fare, such as a ticket with a 3-day minimum stay This field is used by the following payment products: 840

Type: str

property exchange_ticket: str | None
New ticket number that is issued when a ticket is exchanged This field is used by the following payment products: 840

Type: str

property fare: str | None
Deprecated: Use legFare instead. Fare of this leg

Type: str

Deprecated; Use legFare instead. Fare of this leg

property fare_basis: str | None
Fare Basis/Ticket Designator This field is used by the following payment products: 840

Type: str

property fee: int | None
Fee for this leg of the trip This field is used by the following payment products: 840

Type: int

property flight_number: str | None
The flight number assigned by the airline carrier with no leading spaces Should be a numeric string This field is used by the following payment products: cards, 840

Type: str

from_dictionary(dictionary: dict) AirlineFlightLeg[source]
property leg_fare: int | None
Fee for this leg of the trip This field is used by the following payment products: 840

Type: int

property number: int | None
Deprecated: This field is not used by any payment product Sequence number of the flight leg

Type: int

Deprecated; This field is not used by any payment product Sequence number of the flight leg

property origin_airport: str | None
Origin airport/city code This field is used by the following payment products: cards, 840

Type: str

property passenger_class: str | None
PassengerClass if this leg This field is used by the following payment products: 840

Type: str

property stopover_code: str | None
Possible values are:
  • permitted = Stopover permitted

  • non-permitted = Stopover not permitted This field is used by the following payment products: cards, 840

Type: str

property taxes: int | None
Taxes for this leg of the trip This field is used by the following payment products: 840

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.airline_passenger.AirlinePassenger[source]

Bases: DataObject

__annotations__ = {'_AirlinePassenger__airline_loyalty_status': typing.Optional[str], '_AirlinePassenger__first_name': typing.Optional[str], '_AirlinePassenger__passenger_type': typing.Optional[str], '_AirlinePassenger__surname': typing.Optional[str], '_AirlinePassenger__surname_prefix': typing.Optional[str], '_AirlinePassenger__title': typing.Optional[str]}
property airline_loyalty_status: str | None
Airline loyalty program level for the passenger on the itinerary.

Type: str

property first_name: str | None
First name of the passenger This field is used by the following payment products: cards, 840

Type: str

from_dictionary(dictionary: dict) AirlinePassenger[source]
property passenger_type: str | None
Type of passenger on the itinerary.

Type: str

property surname: str | None
Surname of the passenger This field is used by the following payment products: cards, 840

Type: str

property surname_prefix: str | None
Surname prefix or middle name of the passenger This field is used by the following payment products: 840

Type: str

property title: str | None
Deprecated: This field is not used by any payment product Title of the passenger (this property is used for fraud screening on the payment platform)

Type: str

Deprecated; This field is not used by any payment product Title of the passenger (this property is used for fraud screening on the payment platform)

to_dictionary() dict[source]
class onlinepayments.sdk.domain.amount_breakdown.AmountBreakdown[source]

Bases: DataObject

__annotations__ = {'_AmountBreakdown__amount': typing.Optional[int], '_AmountBreakdown__type': typing.Optional[str]}
property amount: int | None
Amount in cents and always having 2 decimals

Type: int

from_dictionary(dictionary: dict) AmountBreakdown[source]
to_dictionary() dict[source]
property type: str | None
Type of the amount. Each type is only allowed to be provided once. Allowed values:
  • AIRPORT_TAX - The amount of tax paid for the airport, with the last 2 digits implied as decimal places.

  • CONSUMPTION_TAX - The amount of consumption tax paid by the customer, with the last 2 digits implied as decimal places.

  • DISCOUNT - Discount on the entire transaction, with the last 2 digits implied as decimal places.

  • DUTY - Duty on the entire transaction, with the last 2 digits implied as decimal places.

  • SHIPPING - Shipping cost on the entire transaction, with the last 2 digits implied as decimal places.

  • VAT - Total amount of VAT paid on the transaction, with the last 2 digits implied as decimal places.

  • BASE_AMOUNT - Order amount excluding all taxes, discount & shipping costs, with the last 2 digits implied as decimal places. Note: BASE_AMOUNT is only supported by the payment platform.

Type: str

class onlinepayments.sdk.domain.amount_of_money.AmountOfMoney[source]

Bases: DataObject

__annotations__ = {'_AmountOfMoney__amount': typing.Optional[int], '_AmountOfMoney__currency_code': typing.Optional[str]}
property amount: int | None
Amount in the smallest currency unit, i.e.:
  • EUR is a 2-decimals currency, the value 1234 will result in EUR 12.34

  • KWD is a 3-decimals currency, the value 1234 will result in KWD 1.234

  • JPY is a zero-decimal currency, the value 1234 will result in JPY 1234

Type: int

property currency_code: str | None
Three-letter ISO currency code representing the currency for the amount

Type: str

from_dictionary(dictionary: dict) AmountOfMoney[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.api_error.APIError[source]

Bases: DataObject

__annotations__ = {'_APIError__category': typing.Optional[str], '_APIError__code': typing.Optional[str], '_APIError__error_code': typing.Optional[str], '_APIError__http_status_code': typing.Optional[int], '_APIError__id': typing.Optional[str], '_APIError__message': typing.Optional[str], '_APIError__property_name': typing.Optional[str], '_APIError__retriable': typing.Optional[bool]}
property category: str | None
Category the error belongs to. The category should give an indication of the type of error you are dealing with. Possible values:
  • DIRECT_PLATFORM_ERROR - indicating that a functional error has occurred in the platform.

  • PAYMENT_PLATFORM_ERROR - indicating that a functional error has occurred in the payment platform.

  • IO_ERROR - indicating that a technical error has occurred within the payment platform or between the payment platform and third party systems.

Type: str

property code: str | None
Deprecated: Use errorCode instead. Error code

Type: str

Deprecated; Use errorCode instead. Error code

property error_code: str | None
Error code

Type: str

from_dictionary(dictionary: dict) APIError[source]
property http_status_code: int | None
HTTP status code for this error that can be used to determine the type of error

Type: int

property id: str | None
ID of the error. This is a short human-readable message that briefly describes the error.

Type: str

property message: str | None
Human-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud

Type: str

property property_name: str | None
Returned only if the error relates to a value that was missing or incorrect.

Contains a location path to the value as a JSonata query.

Some common examples:
  • a.b selects the value of property b of root property a,

  • a[1] selects the first element of the array in root property a,

  • a[b=’some value’] selects all elements of the array in root property a that have a property b with value ‘some value’.

Type: str

property retriable: bool | None
Flag indicating if the request is retriable. Retriable requests mean that a technical error happened and that the same request can safely be sent again with a new idempotence key.

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.apple_pay_line_item.ApplePayLineItem[source]

Bases: DataObject

__annotations__ = {'_ApplePayLineItem__amount': typing.Optional[str], '_ApplePayLineItem__label': typing.Optional[str], '_ApplePayLineItem__payment_timing': typing.Optional[str], '_ApplePayLineItem__recurring_payment_end_date': typing.Optional[str], '_ApplePayLineItem__recurring_payment_interval_count': typing.Optional[int], '_ApplePayLineItem__recurring_payment_interval_unit': typing.Optional[str], '_ApplePayLineItem__recurring_payment_start_date': typing.Optional[str]}
property amount: str | None
A required value that’s the monetary amount of the line item.

Type: str

from_dictionary(dictionary: dict) ApplePayLineItem[source]
property label: str | None
A required value that’s a short, localized description of the line item.

Type: str

property payment_timing: str | None
The time that the payment occurs as part of a successful transaction.

Type: str

property recurring_payment_end_date: str | None
The date of the final payment. Example 2022-01-01T00:00:00

Type: str

property recurring_payment_interval_count: int | None
The number of interval units that make up the total payment interval.

Type: int

property recurring_payment_interval_unit: str | None
The amount of time — in calendar units, such as day, month, or year — that represents a fraction of the total payment interval.

Type: str

property recurring_payment_start_date: str | None
The date of the first payment. Example 2022-01-01T00:00:00

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.apple_pay_recurring_payment_request.ApplePayRecurringPaymentRequest[source]

Bases: DataObject

__annotations__ = {'_ApplePayRecurringPaymentRequest__billing_agreement': typing.Optional[str], '_ApplePayRecurringPaymentRequest__management_url': typing.Optional[str], '_ApplePayRecurringPaymentRequest__payment_description': typing.Optional[str], '_ApplePayRecurringPaymentRequest__regular_billing': typing.Optional[onlinepayments.sdk.domain.apple_pay_line_item.ApplePayLineItem], '_ApplePayRecurringPaymentRequest__trial_billing': typing.Optional[onlinepayments.sdk.domain.apple_pay_line_item.ApplePayLineItem]}
property billing_agreement: str | None
A localized billing agreement that the payment sheet displays to the user before the user authorizes the payment.

Type: str

from_dictionary(dictionary: dict) ApplePayRecurringPaymentRequest[source]
property management_url: str | None
A URL to a web page where the user can update or delete the payment method for the recurring payment.

Type: str

property payment_description: str | None
A description of the recurring payment that Apple Pay displays to the user in the payment sheet.

Type: str

property regular_billing: ApplePayLineItem | None
Object containing specific data regarding Apple Pay recurring payment.

Type: onlinepayments.sdk.domain.apple_pay_line_item.ApplePayLineItem

to_dictionary() dict[source]
property trial_billing: ApplePayLineItem | None
Object containing specific data regarding Apple Pay recurring payment.

Type: onlinepayments.sdk.domain.apple_pay_line_item.ApplePayLineItem

class onlinepayments.sdk.domain.bank_account_iban.BankAccountIban[source]

Bases: DataObject

__annotations__ = {'_BankAccountIban__iban': typing.Optional[str]}
from_dictionary(dictionary: dict) BankAccountIban[source]
property iban: str | None
The IBAN is the International Bank Account Number. It is an internationally agreed format for the BBAN and includes the ISO country code and two check digits. Required for the creation of a Payout Required for Create and Update token. Required for Create mandate and Create payment with mandate calls.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.browser_data.BrowserData[source]

Bases: DataObject

__annotations__ = {'_BrowserData__color_depth': typing.Optional[int], '_BrowserData__java_enabled': typing.Optional[bool], '_BrowserData__java_script_enabled': typing.Optional[bool], '_BrowserData__screen_height': typing.Optional[str], '_BrowserData__screen_width': typing.Optional[str]}
property color_depth: int | None
ColorDepth in bits. Value is returned from the screen.colorDepth property.

If you use the latest version of our JavaScript Client SDK, we will collect this data and include it in the encryptedCustomerInput property. We will then automatically populate this data if available.

Note: This data can only be collected if JavaScript is enabled in the browser. This means that 3-D Secure version 2.1 requires the use of JavaScript to enabled. In the upcoming version 2.2 of the specification this is no longer a requirement.

Type: int

from_dictionary(dictionary: dict) BrowserData[source]
property java_enabled: bool | None
true =Java is enabled in the browser

false = Java is not enabled in the browser

Value is returned from the navigator.javaEnabled property.

If you use the latest version of our JavaScript Client SDK, we will collect this data and include it in the encryptedCustomerInput property. We will then automatically populate this data if available.

Note: This data can only be collected if JavaScript is enabled in the browser. This means that 3-D Secure version 2.1 requires the use of JavaScript to enabled. In the upcoming version 2.2 of the specification this is no longer a requirement.

Type: bool

property java_script_enabled: bool | None
  • true = JavaScript is enabled in the browser.

  • false = JavaScript is not enabled in the browser. In this case the following parameters are not mandatory anymore: colorDepth, javaEnabled, screenHeight, screenWidth, timezoneOffsetUtcMinutes.

Type: bool

property screen_height: str | None
Height of the screen in pixels. Value is returned from the screen.height property.

If you use the latest version of our JavaScript Client SDK, we will collect this data and include it in the encryptedCustomerInput property. We will then automatically populate this data if available.

Note: This data can only be collected if JavaScript is enabled in the browser. This means that 3-D Secure version 2.1 requires the use of JavaScript to enabled. In the upcoming version 2.2 of the specification this is no longer a requirement.

Type: str

property screen_width: str | None
Width of the screen in pixels. Value is returned from the screen.width property.

If you use the latest version of our JavaScript Client SDK, we will collect this data and include it in the encryptedCustomerInput property. We will then automatically populate this data if available.

Note: This data can only be collected if JavaScript is enabled in the browser. This means that 3-D Secure version 2.1 requires the use of JavaScript to enabled. In the upcoming version 2.2 of the specification this is no longer a requirement.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.calculate_surcharge_request.CalculateSurchargeRequest[source]

Bases: DataObject

__annotations__ = {'_CalculateSurchargeRequest__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_CalculateSurchargeRequest__card_source': typing.Optional[onlinepayments.sdk.domain.card_source.CardSource]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property card_source: CardSource | None
Contains elements from which card number can be obtained.

Type: onlinepayments.sdk.domain.card_source.CardSource

from_dictionary(dictionary: dict) CalculateSurchargeRequest[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.calculate_surcharge_response.CalculateSurchargeResponse[source]

Bases: DataObject

__annotations__ = {'_CalculateSurchargeResponse__surcharges': typing.Optional[typing.List[onlinepayments.sdk.domain.surcharge.Surcharge]]}
from_dictionary(dictionary: dict) CalculateSurchargeResponse[source]
property surcharges: List[Surcharge] | None

Type: list[onlinepayments.sdk.domain.surcharge.Surcharge]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.cancel_payment_request.CancelPaymentRequest[source]

Bases: DataObject

__annotations__ = {'_CancelPaymentRequest__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_CancelPaymentRequest__is_final': typing.Optional[bool], '_CancelPaymentRequest__operation_references': typing.Optional[onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

from_dictionary(dictionary: dict) CancelPaymentRequest[source]
property is_final: bool | None
This property indicates whether this will be the final operation. The default value for this property is false.

Type: bool

property operation_references: OperationPaymentReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences

to_dictionary() dict[source]
class onlinepayments.sdk.domain.cancel_payment_response.CancelPaymentResponse[source]

Bases: DataObject

__annotations__ = {'_CancelPaymentResponse__payment': typing.Optional[onlinepayments.sdk.domain.payment_response.PaymentResponse]}
from_dictionary(dictionary: dict) CancelPaymentResponse[source]
property payment: PaymentResponse | None
This object holds the properties related to the payment.

Type: onlinepayments.sdk.domain.payment_response.PaymentResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.capture.Capture[source]

Bases: DataObject

__annotations__ = {'_Capture__capture_output': typing.Optional[onlinepayments.sdk.domain.capture_output.CaptureOutput], '_Capture__id': typing.Optional[str], '_Capture__status': typing.Optional[str], '_Capture__status_output': typing.Optional[onlinepayments.sdk.domain.capture_status_output.CaptureStatusOutput]}
property capture_output: CaptureOutput | None
Object containing capture details

Type: onlinepayments.sdk.domain.capture_output.CaptureOutput

from_dictionary(dictionary: dict) Capture[source]
property id: str | None

Type: str

property status: str | None
Current high-level status of the payment in a human-readable form.

Type: str

property status_output: CaptureStatusOutput | None
This object has the numeric representation of the current capture status, timestamp of last status change and performable action on the current payment resource. In case of failed payments and negative scenarios, detailed error information is listed.

Type: onlinepayments.sdk.domain.capture_status_output.CaptureStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.capture_output.CaptureOutput[source]

Bases: DataObject

__annotations__ = {'_CaptureOutput__acquired_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_CaptureOutput__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_CaptureOutput__amount_paid': typing.Optional[int], '_CaptureOutput__card_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.card_payment_method_specific_output.CardPaymentMethodSpecificOutput], '_CaptureOutput__merchant_parameters': typing.Optional[str], '_CaptureOutput__mobile_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.mobile_payment_method_specific_output.MobilePaymentMethodSpecificOutput], '_CaptureOutput__operation_references': typing.Optional[onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences], '_CaptureOutput__payment_method': typing.Optional[str], '_CaptureOutput__redirect_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.redirect_payment_method_specific_output.RedirectPaymentMethodSpecificOutput], '_CaptureOutput__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences], '_CaptureOutput__sepa_direct_debit_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_output.SepaDirectDebitPaymentMethodSpecificOutput], '_CaptureOutput__surcharge_specific_output': typing.Optional[onlinepayments.sdk.domain.surcharge_specific_output.SurchargeSpecificOutput]}
property acquired_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property amount_paid: int | None
Amount that has been paid. This is deprecated. Use acquiredAmount instead.

Type: int

Deprecated; Amount that has been paid. This is deprecated. Use acquiredAmount instead.

property card_payment_method_specific_output: CardPaymentMethodSpecificOutput | None
Object containing the card payment method details

Type: onlinepayments.sdk.domain.card_payment_method_specific_output.CardPaymentMethodSpecificOutput

from_dictionary(dictionary: dict) CaptureOutput[source]
property merchant_parameters: str | None
It allows you to store additional parameters for the transaction in the format you prefer (e.g.-> key-value query string, JSON, etc.) These parameters are then echoed back to you in API GET calls and Webhook notifications. This field must not contain any personal data.

Type: str

property mobile_payment_method_specific_output: MobilePaymentMethodSpecificOutput | None
Object containing the mobile payment method details

Type: onlinepayments.sdk.domain.mobile_payment_method_specific_output.MobilePaymentMethodSpecificOutput

property operation_references: OperationPaymentReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences

property payment_method: str | None
Payment method identifier used by the our payment engine.

Type: str

property redirect_payment_method_specific_output: RedirectPaymentMethodSpecificOutput | None
Object containing the redirect payment product details

Type: onlinepayments.sdk.domain.redirect_payment_method_specific_output.RedirectPaymentMethodSpecificOutput

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

property sepa_direct_debit_payment_method_specific_output: SepaDirectDebitPaymentMethodSpecificOutput | None
Object containing the SEPA direct debit details

Type: onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_output.SepaDirectDebitPaymentMethodSpecificOutput

property surcharge_specific_output: SurchargeSpecificOutput | None
Object containing specific surcharging attributes applied to an order.

Type: onlinepayments.sdk.domain.surcharge_specific_output.SurchargeSpecificOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.capture_payment_request.CapturePaymentRequest[source]

Bases: DataObject

__annotations__ = {'_CapturePaymentRequest__amount': typing.Optional[int], '_CapturePaymentRequest__is_final': typing.Optional[bool], '_CapturePaymentRequest__operation_references': typing.Optional[onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences], '_CapturePaymentRequest__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences]}
property amount: int | None
Here you can specify the amount that you want to capture (specified in cents, where single digit currencies are presumed to have 2 digits). The amount can be lower than the amount that was authorized, but not higher. If left empty, the full amount will be captured and the request will be final. If the full amount is captured, the request will also be final.

Type: int

from_dictionary(dictionary: dict) CapturePaymentRequest[source]
property is_final: bool | None
This property indicates whether this will be the final operation. The default value for this property is false.

Type: bool

property operation_references: OperationPaymentReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

to_dictionary() dict[source]
class onlinepayments.sdk.domain.capture_response.CaptureResponse[source]

Bases: DataObject

__annotations__ = {'_CaptureResponse__capture_output': typing.Optional[onlinepayments.sdk.domain.capture_output.CaptureOutput], '_CaptureResponse__id': typing.Optional[str], '_CaptureResponse__status': typing.Optional[str], '_CaptureResponse__status_output': typing.Optional[onlinepayments.sdk.domain.capture_status_output.CaptureStatusOutput]}
property capture_output: CaptureOutput | None
Object containing capture details

Type: onlinepayments.sdk.domain.capture_output.CaptureOutput

from_dictionary(dictionary: dict) CaptureResponse[source]
property id: str | None
This is our unique payment transaction identifier.

Type: str

property status: str | None
Current high-level status of the payment in a human-readable form.

Type: str

property status_output: CaptureStatusOutput | None
This object has the numeric representation of the current capture status, timestamp of last status change and performable action on the current payment resource. In case of failed payments and negative scenarios, detailed error information is listed.

Type: onlinepayments.sdk.domain.capture_status_output.CaptureStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.capture_status_output.CaptureStatusOutput[source]

Bases: DataObject

__annotations__ = {'_CaptureStatusOutput__status_code': typing.Optional[int]}
from_dictionary(dictionary: dict) CaptureStatusOutput[source]
property status_code: int | None
Numeric status code of the legacy API. The value can also be found in the BackOffice and in report files.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.captures_response.CapturesResponse[source]

Bases: DataObject

__annotations__ = {'_CapturesResponse__captures': typing.Optional[typing.List[onlinepayments.sdk.domain.capture.Capture]]}
property captures: List[Capture] | None
The list of all captures performed on the requested payment.

Type: list[onlinepayments.sdk.domain.capture.Capture]

from_dictionary(dictionary: dict) CapturesResponse[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.card.Card[source]

Bases: DataObject

__annotations__ = {'_Card__card_number': typing.Optional[str], '_Card__cardholder_name': typing.Optional[str], '_Card__cvv': typing.Optional[str], '_Card__expiry_date': typing.Optional[str]}
property card_number: str | None
The complete credit/debit card number (also known as the PAN) is always obfuscated in any of our responses.

Type: str

property cardholder_name: str | None
The card holder’s name on the card.

Type: str

property cvv: str | None
Card Verification Value, a 3 or 4 digit code used as an additional security feature for card not present transactions.

Type: str

property expiry_date: str | None
Expiry date of the card Format: MMYY

Type: str

from_dictionary(dictionary: dict) Card[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.card_bin_details.CardBinDetails[source]

Bases: DataObject

__annotations__ = {'_CardBinDetails__card_corporate_indicator': typing.Optional[bool], '_CardBinDetails__card_effective_date': typing.Optional[datetime.date], '_CardBinDetails__card_effective_date_indicator': typing.Optional[bool], '_CardBinDetails__card_pan_type': typing.Optional[str], '_CardBinDetails__card_product_code': typing.Optional[str], '_CardBinDetails__card_product_name': typing.Optional[str], '_CardBinDetails__card_product_usage_label': typing.Optional[str], '_CardBinDetails__card_scheme': typing.Optional[str], '_CardBinDetails__card_type': typing.Optional[str], '_CardBinDetails__country_code': typing.Optional[str], '_CardBinDetails__issuer_code': typing.Optional[str], '_CardBinDetails__issuer_name': typing.Optional[str], '_CardBinDetails__issuer_region_code': typing.Optional[str], '_CardBinDetails__issuing_country_code': typing.Optional[str], '_CardBinDetails__pan_length_max': typing.Optional[int], '_CardBinDetails__pan_length_min': typing.Optional[int], '_CardBinDetails__pan_luhn_check': typing.Optional[bool], '_CardBinDetails__virtual_card_indicator': typing.Optional[bool]}
property card_corporate_indicator: bool | None
Indicates whether the card is an Enterprise / Commercial card or not

Type: bool

property card_effective_date: date | None
The card effective date (YYYY-MM-DD)

Type: date

property card_effective_date_indicator: bool | None
Indicator of existence of a card effective date

Type: bool

property card_pan_type: str | None
PAN type sent
  • dpan Digital PAN

  • pan Real PAN

Type: str

property card_product_code: str | None
Product code of the card

Type: str

property card_product_name: str | None
Product name of the card

Type: str

property card_product_usage_label: str | None
Profile name of the card which is displayed on payment electronic ticket in accordance with MPADS requirements
  • commercial Business card

  • credit Credit card

  • debit Debit card

  • prepaid Prepaid card

Type: str

property card_scheme: str | None
Network name associated with the card that is informational only and not to be coded against
  • AmericanExpress American Express scheme

  • Bancontact Bancontact scheme

  • Cb Cartes Bancaires scheme

  • Cup China UnionPay scheme

  • Dankort Dankort scheme

  • DinersDiscover Diners Discover scheme

  • Eftpos eftpos scheme

  • Jcb Japan Credit Bureau scheme

  • Mastercard Mastercard scheme

  • Oney Oney scheme

  • Uatp Universal Air Travel Plan scheme

  • Visa Visa scheme

Type: str

property card_type: str | None
The card’s type as categorised by the payment method. Possible values are:
  • Credit

  • Debit

  • Prepaid

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code of the card issuer

Type: str

from_dictionary(dictionary: dict) CardBinDetails[source]
property issuer_code: str | None
Issuer code of the card

Type: str

property issuer_name: str | None
Issuer name of the card

Type: str

property issuer_region_code: str | None
Region code of the card issuer
  • 1 USA: California, Hawaii, Nevada

  • 2 USA: West except California, Hawaii, Nevada

  • 3 USA: Central North

  • 4 USA: Central South

  • 5 USA: Great Lakes states

  • 6 USA: South East

  • 7 USA: Extreme North East

  • 8 USA: North East

  • 9 USA: Florida and Georgia

  • a Canada

  • b South America

  • c Oceania and Asia

  • d Europe

  • e Africa and Middle East

Type: str

property issuing_country_code: str | None
ISO 3166-1 alpha-2 country code in which the card has been issued

Type: str

property pan_length_max: int | None
Maximum length of the PAN

Type: int

property pan_length_min: int | None
Minimal length of the PAN

Type: int

property pan_luhn_check: bool | None
Indicates whether the PAN is controlled with Lühn Key algorithm

Type: bool

to_dictionary() dict[source]
property virtual_card_indicator: bool | None
Indicates whether the card is a virtual card

Type: bool

class onlinepayments.sdk.domain.card_essentials.CardEssentials[source]

Bases: DataObject

__annotations__ = {'_CardEssentials__bin': typing.Optional[str], '_CardEssentials__card_corporate_indicator': typing.Optional[bool], '_CardEssentials__card_effective_date': typing.Optional[datetime.date], '_CardEssentials__card_effective_date_indicator': typing.Optional[bool], '_CardEssentials__card_number': typing.Optional[str], '_CardEssentials__card_pan_type': typing.Optional[str], '_CardEssentials__card_product_code': typing.Optional[str], '_CardEssentials__card_product_name': typing.Optional[str], '_CardEssentials__card_product_usage_label': typing.Optional[str], '_CardEssentials__card_scheme': typing.Optional[str], '_CardEssentials__card_type': typing.Optional[str], '_CardEssentials__country_code': typing.Optional[str], '_CardEssentials__expiry_date': typing.Optional[str], '_CardEssentials__issuer_code': typing.Optional[str], '_CardEssentials__issuer_name': typing.Optional[str], '_CardEssentials__issuer_region_code': typing.Optional[str], '_CardEssentials__issuing_country_code': typing.Optional[str], '_CardEssentials__pan_length_max': typing.Optional[int], '_CardEssentials__pan_length_min': typing.Optional[int], '_CardEssentials__pan_luhn_check': typing.Optional[bool], '_CardEssentials__virtual_card_indicator': typing.Optional[bool]}
property bin: str | None
The first digits of the credit card number from left to right with a minimum of 6 digits.

Type: str

property card_corporate_indicator: bool | None
Indicates whether the card is an Enterprise / Commercial card or not

Type: bool

property card_effective_date: date | None
The card effective date (YYYY-MM-DD)

Type: date

property card_effective_date_indicator: bool | None
Indicator of existence of a card effective date

Type: bool

property card_number: str | None
The masked credit/debit card number

Type: str

property card_pan_type: str | None
PAN type sent
  • dpan Digital PAN

  • pan Real PAN

Type: str

property card_product_code: str | None
Product code of the card

Type: str

property card_product_name: str | None
Product name of the card

Type: str

property card_product_usage_label: str | None
Profile name of the card which is displayed on payment electronic ticket in accordance with MPADS requirements
  • commercial Business card

  • credit Credit card

  • debit Debit card

  • prepaid Prepaid card

Type: str

property card_scheme: str | None
Network name associated with the card that is informational only and not to be coded against
  • AmericanExpress American Express scheme

  • Bancontact Bancontact scheme

  • Cb Cartes Bancaires scheme

  • Cup China UnionPay scheme

  • Dankort Dankort scheme

  • DinersDiscover Diners Discover scheme

  • Eftpos eftpos scheme

  • Jcb Japan Credit Bureau scheme

  • Mastercard Mastercard scheme

  • Oney Oney scheme

  • Uatp Universal Air Travel Plan scheme

  • Visa Visa scheme

Type: str

property card_type: str | None
The card’s type as categorised by the payment method. Possible values are:
  • Credit

  • Debit

  • Prepaid

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code of the card issuer

Type: str

property expiry_date: str | None
Expiry date of the card Format: MMYY

Type: str

from_dictionary(dictionary: dict) CardEssentials[source]
property issuer_code: str | None
Issuer code of the card

Type: str

property issuer_name: str | None
Issuer name of the card

Type: str

property issuer_region_code: str | None
Region code of the card issuer
  • 1 USA: California, Hawaii, Nevada

  • 2 USA: West except California, Hawaii, Nevada

  • 3 USA: Central North

  • 4 USA: Central South

  • 5 USA: Great Lakes states

  • 6 USA: South East

  • 7 USA: Extreme North East

  • 8 USA: North East

  • 9 USA: Florida and Georgia

  • a Canada

  • b South America

  • c Oceania and Asia

  • d Europe

  • e Africa and Middle East

Type: str

property issuing_country_code: str | None
ISO 3166-1 alpha-2 country code in which the card has been issued

Type: str

property pan_length_max: int | None
Maximum length of the PAN

Type: int

property pan_length_min: int | None
Minimal length of the PAN

Type: int

property pan_luhn_check: bool | None
Indicates whether the PAN is controlled with Lühn Key algorithm

Type: bool

to_dictionary() dict[source]
property virtual_card_indicator: bool | None
Indicates whether the card is a virtual card

Type: bool

class onlinepayments.sdk.domain.card_fraud_results.CardFraudResults[source]

Bases: DataObject

__annotations__ = {'_CardFraudResults__avs_result': typing.Optional[str], '_CardFraudResults__cvv_result': typing.Optional[str], '_CardFraudResults__fraud_service_result': typing.Optional[str]}
property avs_result: str | None
Result of the Address Verification Service checks. Possible values are:
  • A - Address (Street) matches, Zip does not

  • B - Street address match for international transactions—Postal code not verified due to incompatible formats

  • C - Street address and postal code not verified for international transaction due to incompatible formats

  • D - Street address and postal code match for international transaction, cardholder name is incorrect

  • E - AVS error

  • F - Address does match and five digit ZIP code does match (UK only)

  • G - Address information is unavailable; international transaction; non-AVS participant

  • H - Billing address and postal code match, cardholder name is incorrect (Amex)

  • I - Address information not verified for international transaction

  • K - Cardholder name matches (Amex)

  • L - Cardholder name and postal code match (Amex)

  • M - Cardholder name, street address, and postal code match for international transaction

  • N - No Match on Address (Street) or Zip

  • O - Cardholder name and address match (Amex)

  • P - Postal codes match for international transaction—Street address not verified due to incompatible formats

  • Q - Billing address matches, cardholder is incorrect (Amex)

  • R - Retry, System unavailable or Timed out

  • S - Service not supported by issuer

  • U - Address information is unavailable

  • W - 9 digit Zip matches, Address (Street) does not

  • X - Exact AVS Match

  • Y - Address (Street) and 5 digit Zip match

  • Z - 5 digit Zip matches, Address (Street) does not

  • 0 - No service available

Type: str

property cvv_result: str | None
Result of the Card Verification Value checks. Possible values are:
  • M - CVV check performed and valid value

  • N - CVV checked and no match

  • P - CVV check not performed, not requested

  • S - Cardholder claims no CVV code on card, issuer states CVV-code should be on card

  • U - Issuer not certified for CVV2

  • Y - Server provider did not respond

  • 0 - No service available

Type: str

property fraud_service_result: str | None
Resulting advice of the fraud prevention checks. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted

  • challenged - Based on the checks performed the transaction should be manually reviewed

  • denied - Based on the checks performed the transaction should be rejected

  • no-advice - No fraud check was requested/performed

  • error - The fraud check resulted an error. Note that the fraud check was thus not performed.

Type: str

from_dictionary(dictionary: dict) CardFraudResults[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.card_info.CardInfo[source]

Bases: DataObject

__annotations__ = {'_CardInfo__card_number': typing.Optional[str], '_CardInfo__payment_product_id': typing.Optional[int]}
property card_number: str | None
The complete credit/debit card number (also known as the PAN) is always obfuscated in any of our responses.

Type: str

from_dictionary(dictionary: dict) CardInfo[source]
property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.card_payment_method_specific_input.CardPaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_CardPaymentMethodSpecificInput__allow_dynamic_linking': typing.Optional[bool], '_CardPaymentMethodSpecificInput__authorization_mode': typing.Optional[str], '_CardPaymentMethodSpecificInput__card': typing.Optional[onlinepayments.sdk.domain.card.Card], '_CardPaymentMethodSpecificInput__card_on_file_recurring_expiration': typing.Optional[str], '_CardPaymentMethodSpecificInput__card_on_file_recurring_frequency': typing.Optional[str], '_CardPaymentMethodSpecificInput__cobrand_selection_indicator': typing.Optional[str], '_CardPaymentMethodSpecificInput__currency_conversion': typing.Optional[onlinepayments.sdk.domain.currency_conversion_input.CurrencyConversionInput], '_CardPaymentMethodSpecificInput__initial_scheme_transaction_id': typing.Optional[str], '_CardPaymentMethodSpecificInput__is_recurring': typing.Optional[bool], '_CardPaymentMethodSpecificInput__market_place': typing.Optional[onlinepayments.sdk.domain.market_place.MarketPlace], '_CardPaymentMethodSpecificInput__multiple_payment_information': typing.Optional[onlinepayments.sdk.domain.multiple_payment_information.MultiplePaymentInformation], '_CardPaymentMethodSpecificInput__network_token_data': typing.Optional[onlinepayments.sdk.domain.network_token_data.NetworkTokenData], '_CardPaymentMethodSpecificInput__payment_product130_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product130_specific_input.PaymentProduct130SpecificInput], '_CardPaymentMethodSpecificInput__payment_product3012_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3012_specific_input.PaymentProduct3012SpecificInput], '_CardPaymentMethodSpecificInput__payment_product3013_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3013_specific_input.PaymentProduct3013SpecificInput], '_CardPaymentMethodSpecificInput__payment_product3208_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3208_specific_input.PaymentProduct3208SpecificInput], '_CardPaymentMethodSpecificInput__payment_product3209_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3209_specific_input.PaymentProduct3209SpecificInput], '_CardPaymentMethodSpecificInput__payment_product_id': typing.Optional[int], '_CardPaymentMethodSpecificInput__recurring': typing.Optional[onlinepayments.sdk.domain.card_recurrence_details.CardRecurrenceDetails], '_CardPaymentMethodSpecificInput__return_url': typing.Optional[str], '_CardPaymentMethodSpecificInput__scheme_reference_data': typing.Optional[str], '_CardPaymentMethodSpecificInput__skip_authentication': typing.Optional[bool], '_CardPaymentMethodSpecificInput__three_d_secure': typing.Optional[onlinepayments.sdk.domain.three_d_secure.ThreeDSecure], '_CardPaymentMethodSpecificInput__token': typing.Optional[str], '_CardPaymentMethodSpecificInput__tokenize': typing.Optional[bool], '_CardPaymentMethodSpecificInput__transaction_channel': typing.Optional[str], '_CardPaymentMethodSpecificInput__unscheduled_card_on_file_requestor': typing.Optional[str], '_CardPaymentMethodSpecificInput__unscheduled_card_on_file_sequence_indicator': typing.Optional[str]}
property allow_dynamic_linking: bool | None
  • true - Default - Allows subsequent payments to use PSD2 dynamic linking from this payment (including Card On File).

  • false - Indicates that the dynamic linking (including Card On File data) will be ignored.

Type: bool

property authorization_mode: str | None
Determines the type of the authorization that will be used. Allowed values:
  • FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can’t be reversed and need to be captured for the full amount within 7 days.

  • PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.

  • SALE - The payment creation results in an authorization that is already captured at the moment of approval.

Only used with some acquirers, ignored for acquirers that do not support this. In case the acquirer does not allow this to be specified the authorizationMode is ‘unspecified’, which behaves similar to a final authorization.

Type: str

property card: Card | None
Object containing card details

Type: onlinepayments.sdk.domain.card.Card

property card_on_file_recurring_expiration: str | None
The end date of the last scheduled payment in a series of transactions. Format YYYYMMDD

Type: str

property card_on_file_recurring_frequency: str | None
Period of payment occurrence for recurring and installment payments. Allowed values:
  • Yearly

  • Quarterly

  • Monthly

  • Weekly

  • Daily

Type: str

property cobrand_selection_indicator: str | None
For cobranded cards, this field indicates the brand selection method:
  • default - The holder implicitly accepted the default brand.

  • alternative - The holder explicitly selected an alternative brand.

  • notApplicable - The card is not cobranded.

Type: str

property currency_conversion: CurrencyConversionInput | None

Type: onlinepayments.sdk.domain.currency_conversion_input.CurrencyConversionInput

from_dictionary(dictionary: dict) CardPaymentMethodSpecificInput[source]
property initial_scheme_transaction_id: str | None
The unique scheme transactionId of the initial transaction that was performed with SCA. In case this is unknown a scheme transactionId of an earlier transaction part of the same sequence can be used as a fall-back. Strongly advised to be submitted for any MerchantInitiated or recurring transaction (a subsequent one).

Type: str

property is_recurring: bool | None
  • true - Indicates that the transaction is part of a scheduled recurring sequence. In addition, recurringPaymentSequenceIndicator indicates if the transaction is the first or subsequent in a recurring sequence.

  • false - Indicates that the transaction is not part of a scheduled recurring sequence. The default value for this property is false.

Type: bool

property market_place: MarketPlace | None
Object containing marketplace-related data for additional information on sub-merchants (retailers) transacting via the marketplace’s platform. This object is required for platforms onboarding multiple sellers to ensure accurate identification and attribution of each transaction. The platform must collect and submit the retailer’s country and regional information in accordance with card scheme requirements. In some cases, Visa may treat specific regions—such as EU member states—as a single country entity for regulatory and reporting purposes.

Type: onlinepayments.sdk.domain.market_place.MarketPlace

property multiple_payment_information: MultiplePaymentInformation | None
Container announcing forecoming subsequent payments. Holds modalities of these subsequent payments.

Type: onlinepayments.sdk.domain.multiple_payment_information.MultiplePaymentInformation

property network_token_data: NetworkTokenData | None
Object containing Network Token details

Type: onlinepayments.sdk.domain.network_token_data.NetworkTokenData

property payment_product130_specific_input: PaymentProduct130SpecificInput | None
Object containing specific input required for CB payments

Type: onlinepayments.sdk.domain.payment_product130_specific_input.PaymentProduct130SpecificInput

property payment_product3012_specific_input: PaymentProduct3012SpecificInput | None
Object containing specific input required for bancontact.

Type: onlinepayments.sdk.domain.payment_product3012_specific_input.PaymentProduct3012SpecificInput

property payment_product3013_specific_input: PaymentProduct3013SpecificInput | None
An object containing specific input required for VISA purchasing authorization.

Type: onlinepayments.sdk.domain.payment_product3013_specific_input.PaymentProduct3013SpecificInput

property payment_product3208_specific_input: PaymentProduct3208SpecificInput | None
Object containing specific input required for OneyDuplo Leroy Merlin payments.

Type: onlinepayments.sdk.domain.payment_product3208_specific_input.PaymentProduct3208SpecificInput

property payment_product3209_specific_input: PaymentProduct3209SpecificInput | None
Object containing specific input required for OneyDuplo Alcampo payments.

Type: onlinepayments.sdk.domain.payment_product3209_specific_input.PaymentProduct3209SpecificInput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property recurring: CardRecurrenceDetails | None
Object containing data related to recurring

Type: onlinepayments.sdk.domain.card_recurrence_details.CardRecurrenceDetails

property return_url: str | None
The URL that the customer is redirect to after the payment flow has finished. You can add any number of key value pairs in the query string that, for instance help you to identify the customer when they return to your site. Please note that we will also append some additional key value pairs that will also help you with this identification process. Note: The provided URL should be absolute and contain the protocol to use, e.g. http:// or https://. For use on mobile devices a custom protocol can be used in the form of protocol://. This protocol must be registered on the device first. URLs without a protocol will be rejected.

Type: str

property scheme_reference_data: str | None
This is the unique Scheme Reference Data from the initial transaction that was performed with a Strong Customer Authentication. In case this value is unknown, a Scheme Reference of an earlier transaction that was part of the same sequence can be used as a fall-back. Still, it is strongly advised to submit this value for any Merchant Initiated Transaction or any recurring transaction (hereby defined as “Subsequent”).

Type: str

property skip_authentication: bool | None
Deprecated: Use threeDSecure.skipAuthentication instead.
  • true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to recurring.

  • false = 3D Secure authentication will not be skipped for this transaction.

Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction.

Type: bool

Deprecated; Use threeDSecure.skipAuthentication instead. * true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to recurring. * false = 3D Secure authentication will not be skipped for this transaction. Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction.

property three_d_secure: ThreeDSecure | None
Object containing specific data regarding 3-D Secure

Type: onlinepayments.sdk.domain.three_d_secure.ThreeDSecure

to_dictionary() dict[source]
property token: str | None
ID of the token to use to create the payment.

Type: str

property tokenize: bool | None
Indicates if this transaction should be tokenized
  • true - Tokenize the transaction. Note that a payment on the payment platform that results in a status REDIRECTED cannot be tokenized in this way.

  • false - Do not tokenize the transaction, unless it would be tokenized by other means such as auto-tokenization of recurring payments.

Type: bool

property transaction_channel: str | None
Indicates the channel via which the payment is created. Allowed values:
  • ECOMMERCE - The transaction is a regular E-Commerce transaction.

  • MOTO - The transaction is a Mail Order/Telephone Order.

Defaults to ECOMMERCE.

Type: str

property unscheduled_card_on_file_requestor: str | None
Indicates which party initiated the unscheduled recurring transaction. Allowed values:
  • merchantInitiated - Merchant Initiated Transaction.

  • cardholderInitiated - Cardholder Initiated Transaction. Note:

  • This property is not allowed if isRecurring is true.

  • When a customer has chosen to use a token on a hosted checkout this property is set to “cardholderInitiated”.

Type: str

property unscheduled_card_on_file_sequence_indicator: str | None
  • first = This transaction is the first of a series of unscheduled recurring transactions

  • subsequent = This transaction is a subsequent transaction in a series of unscheduled recurring transactions Note: this property is not allowed if isRecurring is true.

Type: str

class onlinepayments.sdk.domain.card_payment_method_specific_input_base.CardPaymentMethodSpecificInputBase[source]

Bases: DataObject

__annotations__ = {'_CardPaymentMethodSpecificInputBase__allow_dynamic_linking': typing.Optional[bool], '_CardPaymentMethodSpecificInputBase__authorization_mode': typing.Optional[str], '_CardPaymentMethodSpecificInputBase__currency_conversion_specific_input': typing.Optional[onlinepayments.sdk.domain.currency_conversion_specific_input.CurrencyConversionSpecificInput], '_CardPaymentMethodSpecificInputBase__initial_scheme_transaction_id': typing.Optional[str], '_CardPaymentMethodSpecificInputBase__market_place': typing.Optional[onlinepayments.sdk.domain.market_place.MarketPlace], '_CardPaymentMethodSpecificInputBase__multiple_payment_information': typing.Optional[onlinepayments.sdk.domain.multiple_payment_information.MultiplePaymentInformation], '_CardPaymentMethodSpecificInputBase__payment_product130_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product130_specific_input.PaymentProduct130SpecificInput], '_CardPaymentMethodSpecificInputBase__payment_product3012_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3012_specific_input.PaymentProduct3012SpecificInput], '_CardPaymentMethodSpecificInputBase__payment_product3013_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3013_specific_input.PaymentProduct3013SpecificInput], '_CardPaymentMethodSpecificInputBase__payment_product3208_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3208_specific_input.PaymentProduct3208SpecificInput], '_CardPaymentMethodSpecificInputBase__payment_product3209_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product3209_specific_input.PaymentProduct3209SpecificInput], '_CardPaymentMethodSpecificInputBase__payment_product5100_specific_input': typing.Optional[onlinepayments.sdk.domain.payment_product5100_specific_input.PaymentProduct5100SpecificInput], '_CardPaymentMethodSpecificInputBase__payment_product_id': typing.Optional[int], '_CardPaymentMethodSpecificInputBase__recurring': typing.Optional[onlinepayments.sdk.domain.card_recurrence_details.CardRecurrenceDetails], '_CardPaymentMethodSpecificInputBase__three_d_secure': typing.Optional[onlinepayments.sdk.domain.three_d_secure_base.ThreeDSecureBase], '_CardPaymentMethodSpecificInputBase__token': typing.Optional[str], '_CardPaymentMethodSpecificInputBase__tokenize': typing.Optional[bool], '_CardPaymentMethodSpecificInputBase__transaction_channel': typing.Optional[str], '_CardPaymentMethodSpecificInputBase__unscheduled_card_on_file_requestor': typing.Optional[str], '_CardPaymentMethodSpecificInputBase__unscheduled_card_on_file_sequence_indicator': typing.Optional[str]}
property allow_dynamic_linking: bool | None
  • true - Default - Allows subsequent payments to use PSD2 dynamic linking from this payment (including Card On File).

  • false - Indicates that the dynamic linking (including Card On File data) will be ignored.

Type: bool

property authorization_mode: str | None
Determines the type of the authorization that will be used. Allowed values:
  • FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can’t be reversed and need to be captured for the full amount within 7 days.

  • PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.

  • SALE - The payment creation results in an authorization that is already captured at the moment of approval.

Only used with some acquirers, ignored for acquirers that do not support this. In case the acquirer does not allow this to be specified the authorizationMode is ‘unspecified’, which behaves similar to a final authorization.

Type: str

property currency_conversion_specific_input: CurrencyConversionSpecificInput | None
Object containing specific input required for Dynamic Currency Conversion.

Type: onlinepayments.sdk.domain.currency_conversion_specific_input.CurrencyConversionSpecificInput

from_dictionary(dictionary: dict) CardPaymentMethodSpecificInputBase[source]
property initial_scheme_transaction_id: str | None
The unique scheme transactionId of the initial transaction that was performed with SCA. In case this is unknown a scheme transactionId of an earlier transaction part of the same sequence can be used as a fall-back. Strongly advised to be submitted for any MerchantInitiated or recurring transaction (a subsequent one).

Type: str

property market_place: MarketPlace | None
Object containing marketplace-related data for additional information on sub-merchants (retailers) transacting via the marketplace’s platform. This object is required for platforms onboarding multiple sellers to ensure accurate identification and attribution of each transaction. The platform must collect and submit the retailer’s country and regional information in accordance with card scheme requirements. In some cases, Visa may treat specific regions—such as EU member states—as a single country entity for regulatory and reporting purposes.

Type: onlinepayments.sdk.domain.market_place.MarketPlace

property multiple_payment_information: MultiplePaymentInformation | None
Container announcing forecoming subsequent payments. Holds modalities of these subsequent payments.

Type: onlinepayments.sdk.domain.multiple_payment_information.MultiplePaymentInformation

property payment_product130_specific_input: PaymentProduct130SpecificInput | None
Object containing specific input required for CB payments

Type: onlinepayments.sdk.domain.payment_product130_specific_input.PaymentProduct130SpecificInput

property payment_product3012_specific_input: PaymentProduct3012SpecificInput | None
Object containing specific input required for bancontact.

Type: onlinepayments.sdk.domain.payment_product3012_specific_input.PaymentProduct3012SpecificInput

property payment_product3013_specific_input: PaymentProduct3013SpecificInput | None
An object containing specific input required for VISA purchasing authorization.

Type: onlinepayments.sdk.domain.payment_product3013_specific_input.PaymentProduct3013SpecificInput

property payment_product3208_specific_input: PaymentProduct3208SpecificInput | None
Object containing specific input required for OneyDuplo Leroy Merlin payments.

Type: onlinepayments.sdk.domain.payment_product3208_specific_input.PaymentProduct3208SpecificInput

property payment_product3209_specific_input: PaymentProduct3209SpecificInput | None
Object containing specific input required for OneyDuplo Alcampo payments.

Type: onlinepayments.sdk.domain.payment_product3209_specific_input.PaymentProduct3209SpecificInput

property payment_product5100_specific_input: PaymentProduct5100SpecificInput | None
Object containing specific input required for Cpay payments.

Type: onlinepayments.sdk.domain.payment_product5100_specific_input.PaymentProduct5100SpecificInput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property recurring: CardRecurrenceDetails | None
Object containing data related to recurring

Type: onlinepayments.sdk.domain.card_recurrence_details.CardRecurrenceDetails

property three_d_secure: ThreeDSecureBase | None
Object containing specific data regarding 3-D Secure

Type: onlinepayments.sdk.domain.three_d_secure_base.ThreeDSecureBase

to_dictionary() dict[source]
property token: str | None
ID of the token to use to create the payment.

Type: str

property tokenize: bool | None
Indicates if this transaction should be tokenized * true - Tokenize the transaction. * false - Do not tokenize the transaction, unless it would be tokenized by other means such as auto-tokenization of recurring payments. Note: This property is deprecated for Hosted Checkout integrations. It has been deprecated by hostedCheckoutSpecificInput.cardPaymentMethodSpecificInput.tokenizationMode.

Type: bool

property transaction_channel: str | None
Indicates the channel via which the payment is created. Allowed values:
  • ECOMMERCE - The transaction is a regular E-Commerce transaction.

  • MOTO - The transaction is a Mail Order/Telephone Order.

Defaults to ECOMMERCE.

Type: str

property unscheduled_card_on_file_requestor: str | None
Indicates which party initiated the unscheduled recurring transaction. Allowed values:
  • merchantInitiated - Merchant Initiated Transaction.

  • cardholderInitiated - Cardholder Initiated Transaction. Note:

  • This property is not allowed if isRecurring is true.

  • When a customer has chosen to use a token on a hosted checkout this property is set to “cardholderInitiated”.

Type: str

property unscheduled_card_on_file_sequence_indicator: str | None
  • first = This transaction is the first of a series of unscheduled recurring transactions

  • subsequent = This transaction is a subsequent transaction in a series of unscheduled recurring transactions Note: this property is not allowed if isRecurring is true.

Type: str

class onlinepayments.sdk.domain.card_payment_method_specific_input_for_hosted_checkout.CardPaymentMethodSpecificInputForHostedCheckout[source]

Bases: DataObject

__annotations__ = {'_CardPaymentMethodSpecificInputForHostedCheckout__click_to_pay': typing.Optional[bool], '_CardPaymentMethodSpecificInputForHostedCheckout__group_cards': typing.Optional[bool], '_CardPaymentMethodSpecificInputForHostedCheckout__payment_product_preferred_order': typing.Optional[typing.List[int]], '_CardPaymentMethodSpecificInputForHostedCheckout__tokenization_mode': typing.Optional[str]}
property click_to_pay: bool | None
  • true - Hosted Checkout will show Click to Pay, with cards grouped as one payment method

  • false - Default - Hosted Checkout will show cards as separate payment methods without Click to Pay

Type: bool

from_dictionary(dictionary: dict) CardPaymentMethodSpecificInputForHostedCheckout[source]
property group_cards: bool | None
  • true - Hosted Checkout will allow to show cards grouped as one payment method

  • false - Default - Hosted Checkout will show cards as separate payment methods

Type: bool

property payment_product_preferred_order: List[int] | None
This array contains the payment product identifiers representing the brands. For co-badged cards, this displays their available brands in the order defined by this array, when groupCards is activated.

Type: list[int]

to_dictionary() dict[source]
property tokenization_mode: str | None
Controls the generation and use of a token within a hosted checkout session.
  • createWithConsent - Presents the payer with a capture consent checkbox to decide whether they would like to tokenize their payment information for future use.

  • createAlways - Tokenizes the payment information automatically without presenting the capture consent checkbox to the payer; please ensure consent is captured on your interface.

  • useExplicitly - The payer can only use the token supplied in cardpaymentmethodspecificinput.token; if the token is invalid or no token is provided, the request will fail.

  • noTokenization - The payer’s payment information will not be tokenized and the payer will not be presented with the ability to tokenize their payment information; use this for one-off payments. Note: This property is not allowed when cardpaymentmethodspecificinput.tokenize is specified.

Type: str

class onlinepayments.sdk.domain.card_payment_method_specific_output.CardPaymentMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_CardPaymentMethodSpecificOutput__acquirer_information': typing.Optional[onlinepayments.sdk.domain.acquirer_information.AcquirerInformation], '_CardPaymentMethodSpecificOutput__authenticated_amount': typing.Optional[int], '_CardPaymentMethodSpecificOutput__authorisation_code': typing.Optional[str], '_CardPaymentMethodSpecificOutput__card': typing.Optional[onlinepayments.sdk.domain.card_essentials.CardEssentials], '_CardPaymentMethodSpecificOutput__click_to_pay': typing.Optional[onlinepayments.sdk.domain.click_to_pay.ClickToPay], '_CardPaymentMethodSpecificOutput__cobrand_selection_indicator': typing.Optional[str], '_CardPaymentMethodSpecificOutput__currency_conversion': typing.Optional[onlinepayments.sdk.domain.currency_conversion.CurrencyConversion], '_CardPaymentMethodSpecificOutput__external_token_linked': typing.Optional[onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked], '_CardPaymentMethodSpecificOutput__fraud_results': typing.Optional[onlinepayments.sdk.domain.card_fraud_results.CardFraudResults], '_CardPaymentMethodSpecificOutput__initial_scheme_transaction_id': typing.Optional[str], '_CardPaymentMethodSpecificOutput__network_token_data': typing.Optional[onlinepayments.sdk.domain.network_token_essentials.NetworkTokenEssentials], '_CardPaymentMethodSpecificOutput__payment_account_reference': typing.Optional[str], '_CardPaymentMethodSpecificOutput__payment_option': typing.Optional[str], '_CardPaymentMethodSpecificOutput__payment_product3208_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product3208_specific_output.PaymentProduct3208SpecificOutput], '_CardPaymentMethodSpecificOutput__payment_product3209_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product3209_specific_output.PaymentProduct3209SpecificOutput], '_CardPaymentMethodSpecificOutput__payment_product_id': typing.Optional[int], '_CardPaymentMethodSpecificOutput__reattempt_instructions': typing.Optional[onlinepayments.sdk.domain.reattempt_instructions.ReattemptInstructions], '_CardPaymentMethodSpecificOutput__scheme_reference_data': typing.Optional[str], '_CardPaymentMethodSpecificOutput__three_d_secure_results': typing.Optional[onlinepayments.sdk.domain.three_d_secure_results.ThreeDSecureResults], '_CardPaymentMethodSpecificOutput__token': typing.Optional[str]}
property acquirer_information: AcquirerInformation | None
Information about the acquirer used to process the transaction

Type: onlinepayments.sdk.domain.acquirer_information.AcquirerInformation

property authenticated_amount: int | None
The amount to be authenticated. This field should be populated if the amount to be authenticated differs from the amount to be authorized (by default they are considered equal). Amount in cents and always having 2 decimals.

Type: int

property authorisation_code: str | None
Card Authorization code as returned by the acquirer

Type: str

property card: CardEssentials | None
Object containing card details

Type: onlinepayments.sdk.domain.card_essentials.CardEssentials

property click_to_pay: ClickToPay | None
Information about whether the payment is made using Click to Pay

Type: onlinepayments.sdk.domain.click_to_pay.ClickToPay

property cobrand_selection_indicator: str | None
For cobranded cards, this field indicates the brand selection method:
  • default - The holder implicitly accepted the default brand.

  • alternative - The holder explicitly selected an alternative brand.

  • notApplicable - The card is not cobranded.

Type: str

property currency_conversion: CurrencyConversion | None

Type: onlinepayments.sdk.domain.currency_conversion.CurrencyConversion

property external_token_linked: ExternalTokenLinked | None

Type: onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked

property fraud_results: CardFraudResults | None
Fraud results contained in the CardFraudResults object

Type: onlinepayments.sdk.domain.card_fraud_results.CardFraudResults

from_dictionary(dictionary: dict) CardPaymentMethodSpecificOutput[source]
property initial_scheme_transaction_id: str | None
The unique scheme transactionId of the initial transaction that was performed with SCA. In case this is unknown a scheme transactionId of an earlier transaction part of the same sequence can be used as a fall-back. Strongly advised to be submitted for any MerchantInitiated or recurring transaction (a subsequent one).

Type: str

property network_token_data: NetworkTokenEssentials | None
Object containing network token details

Type: onlinepayments.sdk.domain.network_token_essentials.NetworkTokenEssentials

property payment_account_reference: str | None
The Payment Account Reference is a unique alphanumeric identifier that links a PAN with all subsequent PANs for the same payment account (e.g., following card replacement) and all EMV payment tokens associated with that account. On its own Payment Account Reference cannot be used to start financial transactions, but it does allow for complying with regulatory requirements, performing risk analysis & supporting loyalty programs. Please note that the Payment Account Reference is a value returned after an authorization & only if provided by the acquirer and/or the issuer.

Type: str

property payment_option: str | None
The specific payment option for the payment. To be used as a complement of the more generic paymentProductId (oney, banquecasino, cofidis), which allows to define a variation of the selected paymentProductId (ex: facilypay3x, banquecasino4x, cofidis3x-sansfrais, …). List of modalities included in the payment product page.

Type: str

property payment_product3208_specific_output: PaymentProduct3208SpecificOutput | None
OneyDuplo Leroy Merlin specific details

Type: onlinepayments.sdk.domain.payment_product3208_specific_output.PaymentProduct3208SpecificOutput

property payment_product3209_specific_output: PaymentProduct3209SpecificOutput | None
OneyDuplo Alcampo specific details

Type: onlinepayments.sdk.domain.payment_product3209_specific_output.PaymentProduct3209SpecificOutput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property reattempt_instructions: ReattemptInstructions | None
Instructions for reattempting a declined authorization. Provided only in case of declined authorization, for those acquirers that may respond with explicit instructions regarding potential reattempt processing.

Type: onlinepayments.sdk.domain.reattempt_instructions.ReattemptInstructions

property scheme_reference_data: str | None
This is the unique Scheme Reference Data from the initial transaction that was performed with a Strong Customer Authentication. In case this value is unknown, a Scheme Reference of an earlier transaction that was part of the same sequence can be used as a fall-back. Still, it is strongly advised to submit this value for any Merchant Initiated Transaction or any recurring transaction (hereby defined as “Subsequent”).

Type: str

property three_d_secure_results: ThreeDSecureResults | None
3D Secure results object

Type: onlinepayments.sdk.domain.three_d_secure_results.ThreeDSecureResults

to_dictionary() dict[source]
property token: str | None
ID of the token. This property is populated when the payment was done with a token or when the payment was tokenized.

Type: str

class onlinepayments.sdk.domain.card_payout_method_specific_input.CardPayoutMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_CardPayoutMethodSpecificInput__card': typing.Optional[onlinepayments.sdk.domain.card.Card], '_CardPayoutMethodSpecificInput__payment_product_id': typing.Optional[int], '_CardPayoutMethodSpecificInput__payout_reason': typing.Optional[str], '_CardPayoutMethodSpecificInput__token': typing.Optional[str]}
property card: Card | None
Object containing card details

Type: onlinepayments.sdk.domain.card.Card

from_dictionary(dictionary: dict) CardPayoutMethodSpecificInput[source]
property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property payout_reason: str | None
Allows you to additionally specify the reason for initiating the payout for authorization purposes. If this field is not specified, authorization of the payment will be made according to your merchant profile. Possible values are:
  • Gambling

  • Refund

  • Loyalty

Type: str

to_dictionary() dict[source]
property token: str | None
ID of the token

Type: str

class onlinepayments.sdk.domain.card_recurrence_details.CardRecurrenceDetails[source]

Bases: DataObject

__annotations__ = {'_CardRecurrenceDetails__recurring_payment_sequence_indicator': typing.Optional[str]}
from_dictionary(dictionary: dict) CardRecurrenceDetails[source]
property recurring_payment_sequence_indicator: str | None
  • first = This transaction is the first of a series of recurring transactions

  • recurring = This transaction is a subsequent transaction in a series of recurring transactions

Note: For any first of a recurring the system will automatically create a token as you will need to use a token for any subsequent recurring transactions. In case a token already exists this is indicated in the response with a value of False for the isNewToken property in the response.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.card_source.CardSource[source]

Bases: DataObject

__annotations__ = {'_CardSource__card': typing.Optional[onlinepayments.sdk.domain.surcharge_calculation_card.SurchargeCalculationCard], '_CardSource__encrypted_customer_input': typing.Optional[str], '_CardSource__hosted_tokenization_id': typing.Optional[str], '_CardSource__token': typing.Optional[str]}
property card: SurchargeCalculationCard | None
An object containing card number and payment product id, which is used to determine surcharge product type

Type: onlinepayments.sdk.domain.surcharge_calculation_card.SurchargeCalculationCard

property encrypted_customer_input: str | None
Data that was encrypted client side containing all customer entered data elements like card data. Note: Because this data can only be submitted once to our system and contains encrypted card data you should not store it. As the data was captured within the context of a client session you also need to submit it to us before the session has expired.

Type: str

from_dictionary(dictionary: dict) CardSource[source]
property hosted_tokenization_id: str | None
An Id of a hosted tokenization session

Type: str

to_dictionary() dict[source]
property token: str | None
An identifier that represents card details that have been previously stored

Type: str

class onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv[source]

Bases: DataObject

__annotations__ = {'_CardWithoutCvv__card_number': typing.Optional[str], '_CardWithoutCvv__cardholder_name': typing.Optional[str], '_CardWithoutCvv__expiry_date': typing.Optional[str]}
property card_number: str | None
The obfuscated card number

Type: str

property cardholder_name: str | None
The card holder’s name on the card.

Type: str

property expiry_date: str | None
Expiry date of the card Format: MMYY

Type: str

from_dictionary(dictionary: dict) CardWithoutCvv[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.click_to_pay.ClickToPay[source]

Bases: DataObject

__annotations__ = {'_ClickToPay__is_click_to_pay_payment': typing.Optional[bool]}
from_dictionary(dictionary: dict) ClickToPay[source]
property is_click_to_pay_payment: bool | None
A flag indicating whether the payment is made using Click to Pay

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.company_information.CompanyInformation[source]

Bases: DataObject

__annotations__ = {'_CompanyInformation__name': typing.Optional[str]}
from_dictionary(dictionary: dict) CompanyInformation[source]
property name: str | None
Name of company, as a customer. For Klarna payment method, company name should be provided to trigger a B2B session. If nothing is provided, a B2C session will be the default.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.complete_payment_card_payment_method_specific_input.CompletePaymentCardPaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_CompletePaymentCardPaymentMethodSpecificInput__card': typing.Optional[onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv]}
property card: CardWithoutCvv | None

Type: onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv

from_dictionary(dictionary: dict) CompletePaymentCardPaymentMethodSpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.complete_payment_request.CompletePaymentRequest[source]

Bases: DataObject

__annotations__ = {'_CompletePaymentRequest__card_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.complete_payment_card_payment_method_specific_input.CompletePaymentCardPaymentMethodSpecificInput], '_CompletePaymentRequest__order': typing.Optional[onlinepayments.sdk.domain.order.Order]}
property card_payment_method_specific_input: CompletePaymentCardPaymentMethodSpecificInput | None

Type: onlinepayments.sdk.domain.complete_payment_card_payment_method_specific_input.CompletePaymentCardPaymentMethodSpecificInput

from_dictionary(dictionary: dict) CompletePaymentRequest[source]
property order: Order | None
The order object contains order-related data; Please note that this object is required to submit the amount.

Type: onlinepayments.sdk.domain.order.Order

to_dictionary() dict[source]
class onlinepayments.sdk.domain.complete_payment_response.CompletePaymentResponse[source]

Bases: DataObject

__annotations__ = {'_CompletePaymentResponse__creation_output': typing.Optional[onlinepayments.sdk.domain.payment_creation_output.PaymentCreationOutput], '_CompletePaymentResponse__merchant_action': typing.Optional[onlinepayments.sdk.domain.merchant_action.MerchantAction], '_CompletePaymentResponse__payment': typing.Optional[onlinepayments.sdk.domain.payment_response.PaymentResponse]}
property creation_output: PaymentCreationOutput | None
This object contains the details of the created payment.

Type: onlinepayments.sdk.domain.payment_creation_output.PaymentCreationOutput

from_dictionary(dictionary: dict) CompletePaymentResponse[source]
property merchant_action: MerchantAction | None
This object contains the action, including the needed data, that you should perform next. This could involve showing instructions, displaying the transaction results, or redirecting to a third party to complete the payment.

Type: onlinepayments.sdk.domain.merchant_action.MerchantAction

property payment: PaymentResponse | None
This object holds the properties related to the payment.

Type: onlinepayments.sdk.domain.payment_response.PaymentResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.contact_details.ContactDetails[source]

Bases: DataObject

__annotations__ = {'_ContactDetails__email_address': typing.Optional[str], '_ContactDetails__fax_number': typing.Optional[str], '_ContactDetails__mobile_phone_number': typing.Optional[str], '_ContactDetails__phone_number': typing.Optional[str], '_ContactDetails__work_phone_number': typing.Optional[str]}
property email_address: str | None
Email address of the customer

Type: str

property fax_number: str | None
International version of the fax number of the customer including the leading + (i.e. +16127779311)

Type: str

from_dictionary(dictionary: dict) ContactDetails[source]
property mobile_phone_number: str | None
International version of the mobile phone number of the customer including the leading + (i.e. +16127779311)

Type: str

property phone_number: str | None
International version of the phone number of the customer including the leading + (i.e. +16127779311)

Type: str

to_dictionary() dict[source]
property work_phone_number: str | None
International version of the work phone number of the customer including the leading + (i.e. +31235671500)

Type: str

class onlinepayments.sdk.domain.create_hosted_checkout_request.CreateHostedCheckoutRequest[source]

Bases: DataObject

__annotations__ = {'_CreateHostedCheckoutRequest__card_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.card_payment_method_specific_input_base.CardPaymentMethodSpecificInputBase], '_CreateHostedCheckoutRequest__feedbacks': typing.Optional[onlinepayments.sdk.domain.feedbacks.Feedbacks], '_CreateHostedCheckoutRequest__fraud_fields': typing.Optional[onlinepayments.sdk.domain.fraud_fields.FraudFields], '_CreateHostedCheckoutRequest__hosted_checkout_specific_input': typing.Optional[onlinepayments.sdk.domain.hosted_checkout_specific_input.HostedCheckoutSpecificInput], '_CreateHostedCheckoutRequest__mobile_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.mobile_payment_method_hosted_checkout_specific_input.MobilePaymentMethodHostedCheckoutSpecificInput], '_CreateHostedCheckoutRequest__order': typing.Optional[onlinepayments.sdk.domain.order.Order], '_CreateHostedCheckoutRequest__redirect_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_method_specific_input.RedirectPaymentMethodSpecificInput], '_CreateHostedCheckoutRequest__sepa_direct_debit_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_input_base.SepaDirectDebitPaymentMethodSpecificInputBase]}
property card_payment_method_specific_input: CardPaymentMethodSpecificInputBase | None
Object containing the specific input details for card payments

Type: onlinepayments.sdk.domain.card_payment_method_specific_input_base.CardPaymentMethodSpecificInputBase

property feedbacks: Feedbacks | None
This section will contain feedback Urls to provide feedback on the payment.

Type: onlinepayments.sdk.domain.feedbacks.Feedbacks

property fraud_fields: FraudFields | None
Object containing additional data that will be used to assess the risk of fraud

Type: onlinepayments.sdk.domain.fraud_fields.FraudFields

from_dictionary(dictionary: dict) CreateHostedCheckoutRequest[source]
property hosted_checkout_specific_input: HostedCheckoutSpecificInput | None
Object containing hosted checkout specific data

Type: onlinepayments.sdk.domain.hosted_checkout_specific_input.HostedCheckoutSpecificInput

property mobile_payment_method_specific_input: MobilePaymentMethodHostedCheckoutSpecificInput | None
Object containing the specific input details for mobile payments

Type: onlinepayments.sdk.domain.mobile_payment_method_hosted_checkout_specific_input.MobilePaymentMethodHostedCheckoutSpecificInput

property order: Order | None
The order object contains order-related data; Please note that this object is required to submit the amount.

Type: onlinepayments.sdk.domain.order.Order

property redirect_payment_method_specific_input: RedirectPaymentMethodSpecificInput | None
Object containing the specific input details for payments that involve redirects to 3rd parties to complete, like iDeal and PayPal

Type: onlinepayments.sdk.domain.redirect_payment_method_specific_input.RedirectPaymentMethodSpecificInput

property sepa_direct_debit_payment_method_specific_input: SepaDirectDebitPaymentMethodSpecificInputBase | None
Object containing the specific input details for SEPA direct debit payments

Type: onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_input_base.SepaDirectDebitPaymentMethodSpecificInputBase

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_hosted_checkout_response.CreateHostedCheckoutResponse[source]

Bases: DataObject

__annotations__ = {'_CreateHostedCheckoutResponse__hosted_checkout_id': typing.Optional[str], '_CreateHostedCheckoutResponse__invalid_tokens': typing.Optional[typing.List[str]], '_CreateHostedCheckoutResponse__merchant_reference': typing.Optional[str], '_CreateHostedCheckoutResponse__partial_redirect_url': typing.Optional[str], '_CreateHostedCheckoutResponse__redirect_url': typing.Optional[str], '_CreateHostedCheckoutResponse__returnmac': typing.Optional[str]}
from_dictionary(dictionary: dict) CreateHostedCheckoutResponse[source]
property hosted_checkout_id: str | None
The ID of the Hosted Checkout Session in which the payment was made.

Type: str

property invalid_tokens: List[str] | None

Type: list[str]

property merchant_reference: str | None
Your unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files. It is highly recommended to provide a single MerchantReference per unique order on your side

Type: str

property partial_redirect_url: str | None
The partial URL as generated by our system. You will need to add the protocol and the relevant subdomain to this URL, before redirecting your customer to this URL. A special ‘payment’ subdomain will always work so you can always add ‘https://payment.’ at the beginning of this response value to view your hosted pages.

Type: str

property redirect_url: str | None
The full hosted checkout URL as generated by our system. Use this URL to redirect your customer to the hosted checkout page.

Type: str

property returnmac: str | None
When the customer is returned to your site we will append this property and value to the query-string. You should store this data, so you can identify the returning customer.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_hosted_tokenization_request.CreateHostedTokenizationRequest[source]

Bases: DataObject

__annotations__ = {'_CreateHostedTokenizationRequest__ask_consumer_consent': typing.Optional[bool], '_CreateHostedTokenizationRequest__credit_card_specific_input': typing.Optional[onlinepayments.sdk.domain.credit_card_specific_input_hosted_tokenization.CreditCardSpecificInputHostedTokenization], '_CreateHostedTokenizationRequest__locale': typing.Optional[str], '_CreateHostedTokenizationRequest__payment_product_filters': typing.Optional[onlinepayments.sdk.domain.payment_product_filters_hosted_tokenization.PaymentProductFiltersHostedTokenization], '_CreateHostedTokenizationRequest__tokens': typing.Optional[str], '_CreateHostedTokenizationRequest__variant': typing.Optional[str]}
Indicate if the tokenization form should contain a checkbox asking the user to give consent for storing their information for future payments. If this parameter is false or missing, you should ask the user yourself and provide their answer when submitting the Tokenizer in your JavaScript code. To pass this choice set the submitTokenization function’s parameter storePermanently to false, if you choose not to store the token for subsequent payments, or to true otherwise.

Type: bool

property credit_card_specific_input: CreditCardSpecificInputHostedTokenization | None

Type: onlinepayments.sdk.domain.credit_card_specific_input_hosted_tokenization.CreditCardSpecificInputHostedTokenization

from_dictionary(dictionary: dict) CreateHostedTokenizationRequest[source]
property locale: str | None
Locale used in the GUI towards the consumer.

Type: str

property payment_product_filters: PaymentProductFiltersHostedTokenization | None
Contains the payment product ids that will be used for manipulating the payment products available for the payment to the customer.

Type: onlinepayments.sdk.domain.payment_product_filters_hosted_tokenization.PaymentProductFiltersHostedTokenization

to_dictionary() dict[source]
property tokens: str | None
String containing comma separated tokens (no spaces) associated with the customer of this hosted session. Valid tokens will be used to present the customer the option to re-use previously used payment details. This means the customer for instance does not have to re-enter their card details again, which a big plus when the customer is using their mobile phone to complete the operation.

Type: str

property variant: str | None
You can force the use of a custom template by specifying it in the variant field. This allows you to test out the effect of certain changes to your payment pages in a controlled manner. Please note that you need to specify the filename of the template or customization.

Type: str

class onlinepayments.sdk.domain.create_hosted_tokenization_response.CreateHostedTokenizationResponse[source]

Bases: DataObject

__annotations__ = {'_CreateHostedTokenizationResponse__expired_card_tokens': typing.Optional[typing.List[str]], '_CreateHostedTokenizationResponse__hosted_tokenization_id': typing.Optional[str], '_CreateHostedTokenizationResponse__hosted_tokenization_url': typing.Optional[str], '_CreateHostedTokenizationResponse__invalid_tokens': typing.Optional[typing.List[str]], '_CreateHostedTokenizationResponse__partial_redirect_url': typing.Optional[str]}
property expired_card_tokens: List[str] | None
Tokens referencing expired cards are returned in this array. These tokens can be used in the hosted tokenization session but you must ensure that the expiry date fields are displayed in the form in order to be updated. If you are using the option “hideTokenFields”, these tokens should not be proposed to the customers.

Type: list[str]

from_dictionary(dictionary: dict) CreateHostedTokenizationResponse[source]
property hosted_tokenization_id: str | None
The ID of the Hosted Tokenization Session

Type: str

property hosted_tokenization_url: str | None
The URL you can use in your JavaScript when instantiating the Tokenizer.

Type: str

property invalid_tokens: List[str] | None
Tokens that are submitted in the request are validated. Tokens that cannot be used in the current session are returned in this array. These tokens might not be valid anymore. The validity of tokens can be verified using the Get token endpoint.

Type: list[str]

property partial_redirect_url: str | None
Deprecated. Use hostedTokenizationUrl instead.

The partial URL as generated by our system. You will need to add the protocol and the relevant subdomain to this URL, before redirecting your customer to this URL. A special ‘payment’ subdomain will always work so you can always add ‘https://payment.’ at the beginning of this response value to view your hosted pages.

Type: str

Deprecated; Deprecated

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_mandate_request.CreateMandateRequest[source]

Bases: DataObject

__annotations__ = {'_CreateMandateRequest__alias': typing.Optional[str], '_CreateMandateRequest__customer': typing.Optional[onlinepayments.sdk.domain.mandate_customer.MandateCustomer], '_CreateMandateRequest__customer_reference': typing.Optional[str], '_CreateMandateRequest__language': typing.Optional[str], '_CreateMandateRequest__recurrence_type': typing.Optional[str], '_CreateMandateRequest__return_url': typing.Optional[str], '_CreateMandateRequest__signature_type': typing.Optional[str], '_CreateMandateRequest__unique_mandate_reference': typing.Optional[str]}
property alias: str | None
An alias for the mandate. This can be used to visually represent the mandate. Do not include any unmasked sensitive data in the alias. If this field is not provided the masked IBAN of the customer is used.

Type: str

property customer: MandateCustomer | None
Customer object containing customer specific inputs. Required for Create mandate and Create payment calls.

Type: onlinepayments.sdk.domain.mandate_customer.MandateCustomer

property customer_reference: str | None
The unique identifier of a customer

Type: str

from_dictionary(dictionary: dict) CreateMandateRequest[source]
property language: str | None
The language code of the customer. ISO 639-1, possible values are:
  • de

  • en

  • es

  • fr

  • it

  • nl

  • si

  • sk

  • sv

Type: str

property recurrence_type: str | None
Specifies whether the mandate is for one-off or recurring payments. Possible values are:
  • UNIQUE

  • RECURRING

Type: str

property return_url: str | None
Return URL to use if the mandate signing requires redirection. Required for S2S Create Payment if and only if the signatureType is “SMS”.

Type: str

property signature_type: str | None
Specifies whether the mandate is unsigned, signed by SMS or tick box. Possible values are:
  • UNSIGNED

  • SMS

  • TICK_BOX

Refer to the support page to determine the applicable signature types.

Type: str

to_dictionary() dict[source]
property unique_mandate_reference: str | None
The unique identifier of the mandate

Type: str

class onlinepayments.sdk.domain.create_mandate_response.CreateMandateResponse[source]

Bases: DataObject

__annotations__ = {'_CreateMandateResponse__mandate': typing.Optional[onlinepayments.sdk.domain.mandate_response.MandateResponse], '_CreateMandateResponse__merchant_action': typing.Optional[onlinepayments.sdk.domain.mandate_merchant_action.MandateMerchantAction]}
from_dictionary(dictionary: dict) CreateMandateResponse[source]
property mandate: MandateResponse | None
Object containing the created mandate.

Type: onlinepayments.sdk.domain.mandate_response.MandateResponse

property merchant_action: MandateMerchantAction | None
Object that contains the action, including the needed data, that you should perform next, showing the redirect to a third party to complete the payment or like showing instructions.

Type: onlinepayments.sdk.domain.mandate_merchant_action.MandateMerchantAction

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_mandate_with_return_url.CreateMandateWithReturnUrl[source]

Bases: DataObject

__annotations__ = {'_CreateMandateWithReturnUrl__alias': typing.Optional[str], '_CreateMandateWithReturnUrl__customer': typing.Optional[onlinepayments.sdk.domain.mandate_customer.MandateCustomer], '_CreateMandateWithReturnUrl__customer_reference': typing.Optional[str], '_CreateMandateWithReturnUrl__language': typing.Optional[str], '_CreateMandateWithReturnUrl__recurrence_type': typing.Optional[str], '_CreateMandateWithReturnUrl__return_url': typing.Optional[str], '_CreateMandateWithReturnUrl__signature_type': typing.Optional[str], '_CreateMandateWithReturnUrl__unique_mandate_reference': typing.Optional[str]}
property alias: str | None
An alias for the mandate. This can be used to visually represent the mandate. Do not include any unmasked sensitive data in the alias. If this field is not provided the masked IBAN of the customer is used.

Type: str

property customer: MandateCustomer | None
Customer object containing customer specific inputs. Required for Create mandate and Create payment calls.

Type: onlinepayments.sdk.domain.mandate_customer.MandateCustomer

property customer_reference: str | None
The unique identifier of a customer

Type: str

from_dictionary(dictionary: dict) CreateMandateWithReturnUrl[source]
property language: str | None
The language code of the customer. ISO 639-1, possible values are:
  • de

  • en

  • es

  • fr

  • it

  • nl

  • si

  • sk

  • sv

Type: str

property recurrence_type: str | None
Specifies whether the mandate is for one-off or recurring payments. Possible values are:
  • UNIQUE

  • RECURRING

Type: str

property return_url: str | None
Return URL to use if the mandate signing requires redirection. Required for S2S Create Payment if and only if the signatureType is “SMS”.

Type: str

property signature_type: str | None
Specifies whether the mandate is unsigned, signed by SMS or tick box. Possible values are:
  • UNSIGNED

  • SMS

  • TICK_BOX

Refer to the support page to determine the applicable signature types.

Type: str

to_dictionary() dict[source]
property unique_mandate_reference: str | None
The unique identifier of the mandate

Type: str

class onlinepayments.sdk.domain.create_payment_request.CreatePaymentRequest[source]

Bases: DataObject

__annotations__ = {'_CreatePaymentRequest__card_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.card_payment_method_specific_input.CardPaymentMethodSpecificInput], '_CreatePaymentRequest__encrypted_customer_input': typing.Optional[str], '_CreatePaymentRequest__feedbacks': typing.Optional[onlinepayments.sdk.domain.feedbacks.Feedbacks], '_CreatePaymentRequest__fraud_fields': typing.Optional[onlinepayments.sdk.domain.fraud_fields.FraudFields], '_CreatePaymentRequest__hosted_fields_session_id': typing.Optional[str], '_CreatePaymentRequest__hosted_tokenization_id': typing.Optional[str], '_CreatePaymentRequest__mobile_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.mobile_payment_method_specific_input.MobilePaymentMethodSpecificInput], '_CreatePaymentRequest__order': typing.Optional[onlinepayments.sdk.domain.order.Order], '_CreatePaymentRequest__redirect_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_method_specific_input.RedirectPaymentMethodSpecificInput], '_CreatePaymentRequest__sepa_direct_debit_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_input.SepaDirectDebitPaymentMethodSpecificInput]}
property card_payment_method_specific_input: CardPaymentMethodSpecificInput | None
Object containing the specific input details for card payments

Type: onlinepayments.sdk.domain.card_payment_method_specific_input.CardPaymentMethodSpecificInput

property encrypted_customer_input: str | None
Data that was encrypted client side containing all customer entered data elements like card data. Note: Because this data can only be submitted once to our system and contains encrypted card data you should not store it. As the data was captured within the context of a client session you also need to submit it to us before the session has expired.

Type: str

property feedbacks: Feedbacks | None
This section will contain feedback Urls to provide feedback on the payment.

Type: onlinepayments.sdk.domain.feedbacks.Feedbacks

property fraud_fields: FraudFields | None
Object containing additional data that will be used to assess the risk of fraud

Type: onlinepayments.sdk.domain.fraud_fields.FraudFields

from_dictionary(dictionary: dict) CreatePaymentRequest[source]
property hosted_fields_session_id: str | None
A unique identifier that references a previously created hosted fields session. Use this field to create a payment with the payment method details securely captured in the referenced hosted fields session.

Type: str

property hosted_tokenization_id: str | None
Use this field after a successful Hosted Tokenization session to create a payment with the tokenized payment method details.

Type: str

property mobile_payment_method_specific_input: MobilePaymentMethodSpecificInput | None
Object containing the specific input details for mobile payments

Type: onlinepayments.sdk.domain.mobile_payment_method_specific_input.MobilePaymentMethodSpecificInput

property order: Order | None
The order object contains order-related data; Please note that this object is required to submit the amount.

Type: onlinepayments.sdk.domain.order.Order

property redirect_payment_method_specific_input: RedirectPaymentMethodSpecificInput | None
Object containing the specific input details for payments that involve redirects to 3rd parties to complete, like iDeal and PayPal

Type: onlinepayments.sdk.domain.redirect_payment_method_specific_input.RedirectPaymentMethodSpecificInput

property sepa_direct_debit_payment_method_specific_input: SepaDirectDebitPaymentMethodSpecificInput | None
Object containing the specific input details for SEPA direct debit payments

Type: onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_input.SepaDirectDebitPaymentMethodSpecificInput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_payment_response.CreatePaymentResponse[source]

Bases: DataObject

__annotations__ = {'_CreatePaymentResponse__creation_output': typing.Optional[onlinepayments.sdk.domain.payment_creation_output.PaymentCreationOutput], '_CreatePaymentResponse__merchant_action': typing.Optional[onlinepayments.sdk.domain.merchant_action.MerchantAction], '_CreatePaymentResponse__payment': typing.Optional[onlinepayments.sdk.domain.payment_response.PaymentResponse]}
property creation_output: PaymentCreationOutput | None
This object contains the details of the created payment.

Type: onlinepayments.sdk.domain.payment_creation_output.PaymentCreationOutput

from_dictionary(dictionary: dict) CreatePaymentResponse[source]
property merchant_action: MerchantAction | None
This object contains the action, including the needed data, that you should perform next. This could involve showing instructions, displaying the transaction results, or redirecting to a third party to complete the payment.

Type: onlinepayments.sdk.domain.merchant_action.MerchantAction

property payment: PaymentResponse | None
This object holds the properties related to the payment.

Type: onlinepayments.sdk.domain.payment_response.PaymentResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_payout_request.CreatePayoutRequest[source]

Bases: DataObject

__annotations__ = {'_CreatePayoutRequest__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_CreatePayoutRequest__card_payout_method_specific_input': typing.Optional[onlinepayments.sdk.domain.card_payout_method_specific_input.CardPayoutMethodSpecificInput], '_CreatePayoutRequest__descriptor': typing.Optional[str], '_CreatePayoutRequest__feedbacks': typing.Optional[onlinepayments.sdk.domain.feedbacks.Feedbacks], '_CreatePayoutRequest__omnichannel_payout_specific_input': typing.Optional[onlinepayments.sdk.domain.omnichannel_payout_specific_input.OmnichannelPayoutSpecificInput], '_CreatePayoutRequest__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property card_payout_method_specific_input: CardPayoutMethodSpecificInput | None
Object containing the payout details for a card

Type: onlinepayments.sdk.domain.card_payout_method_specific_input.CardPayoutMethodSpecificInput

property descriptor: str | None
Descriptive text that is used towards to customer, either during an online checkout at a third party and/or on the statement of the customer. For card transactions this is usually referred to as a Soft Descriptor. The maximum allowed length varies per card acquirer:
  • AIB - 22 characters

  • American Express - 25 characters

  • Atos Origin BNP - 15 characters

  • Barclays - 25 characters

  • Catella - 22 characters

  • CBA - 20 characters

  • Elavon - 25 characters

  • First Data - 25 characters

  • INICIS (INIPAY) - 22-30 characters

  • JCB - 25 characters

  • Merchant Solutions - 22-25 characters

  • Payvision (EU & HK) - 25 characters

  • SEB Euroline - 22 characters

  • Sub1 Argentina - 15 characters

  • Wells Fargo - 25 characters Note that we advise you to use 22 characters as the max length as beyond this our experience is that issuers will start to truncate. We currently also only allow per API call overrides for AIB and Barclays For alternative payment products the maximum allowed length varies per payment product:

  • 402 e-Przelewy - 30 characters

  • 404 INICIS - 80 characters

  • 802 Nordea ePayment Finland - 234 characters

  • 809 iDeal - 32 characters

  • 836 SOFORT - 42 characters

  • 840 PayPal - 127 characters

  • 841 WebMoney - 175 characters

  • 849 Yandex - 64 characters

  • 861 Alipay - 256 characters

  • 863 WeChat Pay - 32 characters

  • 880 BOKU - 20 characters

  • 8580 Qiwi - 255 characters

  • 1504 Konbini - 80 characters All other payment products do not support a descriptor.

Type: str

property feedbacks: Feedbacks | None
This section will contain feedback Urls to provide feedback on the payment.

Type: onlinepayments.sdk.domain.feedbacks.Feedbacks

from_dictionary(dictionary: dict) CreatePayoutRequest[source]
property omnichannel_payout_specific_input: OmnichannelPayoutSpecificInput | None
Object containing the additional payout details for an Omnichannel merchant

Type: onlinepayments.sdk.domain.omnichannel_payout_specific_input.OmnichannelPayoutSpecificInput

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

to_dictionary() dict[source]
class onlinepayments.sdk.domain.create_token_request.CreateTokenRequest[source]

Bases: DataObject

__annotations__ = {'_CreateTokenRequest__card': typing.Optional[onlinepayments.sdk.domain.token_card_specific_input.TokenCardSpecificInput], '_CreateTokenRequest__encrypted_customer_input': typing.Optional[str], '_CreateTokenRequest__payment_product_id': typing.Optional[int]}
property card: TokenCardSpecificInput | None
Object containing the token details for a card

Type: onlinepayments.sdk.domain.token_card_specific_input.TokenCardSpecificInput

property encrypted_customer_input: str | None
Data that was encrypted client side containing all customer entered data elements like card data. Note: Because this data can only be submitted once to our system and contains encrypted card data you should not store it. As the data was captured within the context of a client session you also need to submit it to us before the session has expired.

Type: str

from_dictionary(dictionary: dict) CreateTokenRequest[source]
property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.created_payment_output.CreatedPaymentOutput[source]

Bases: DataObject

__annotations__ = {'_CreatedPaymentOutput__payment': typing.Optional[onlinepayments.sdk.domain.payment_response.PaymentResponse], '_CreatedPaymentOutput__payment_status_category': typing.Optional[str]}
from_dictionary(dictionary: dict) CreatedPaymentOutput[source]
property payment: PaymentResponse | None
This object holds the properties related to the payment.

Type: onlinepayments.sdk.domain.payment_response.PaymentResponse

property payment_status_category: str | None

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.created_token_response.CreatedTokenResponse[source]

Bases: DataObject

__annotations__ = {'_CreatedTokenResponse__card': typing.Optional[onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv], '_CreatedTokenResponse__crm_token': typing.Optional[onlinepayments.sdk.domain.crm_token.CrmToken], '_CreatedTokenResponse__external_token_linked': typing.Optional[onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked], '_CreatedTokenResponse__is_new_token': typing.Optional[bool], '_CreatedTokenResponse__token': typing.Optional[str], '_CreatedTokenResponse__token_status': typing.Optional[str]}
property card: CardWithoutCvv | None

Type: onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv

property crm_token: CrmToken | None
The CRM (Customer Relationship Management) token group. CRM tokens are available to enhance knowledge of a merchant’s customers by attempting to identify the customer.

Type: onlinepayments.sdk.domain.crm_token.CrmToken

property external_token_linked: ExternalTokenLinked | None

Type: onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked

from_dictionary(dictionary: dict) CreatedTokenResponse[source]
property is_new_token: bool | None
Indicates if a new token was created
  • true - A new token was created

  • false - A token with the same card number already exists and is returned. Please note that the existing token has not been updated. When you want to update other data then the card number, you need to update data stored in the token explicitly, as data is never updated during the creation of a token.

Type: bool

to_dictionary() dict[source]
property token: str | None
ID of the token

Type: str

property token_status: str | None
This is the status of the token in the hosted tokenization session. Possible values are:
  • UNCHANGED - The token has not changed

  • CREATED - The token has been created

  • UPDATED - The token has been updated

Type: str

class onlinepayments.sdk.domain.credit_card_specific_input_hosted_tokenization.CreditCardSpecificInputHostedTokenization[source]

Bases: DataObject

__annotations__ = {'_CreditCardSpecificInputHostedTokenization__payment_product_preferred_order': typing.Optional[typing.List[int]], '_CreditCardSpecificInputHostedTokenization__validation_rules': typing.Optional[onlinepayments.sdk.domain.credit_card_validation_rules.CreditCardValidationRules]}
from_dictionary(dictionary: dict) CreditCardSpecificInputHostedTokenization[source]
property payment_product_preferred_order: List[int] | None
This array contains the payment product identifiers representing the brands. For co-badged cards, this displays their available brands in the order defined by this array.

Type: list[int]

to_dictionary() dict[source]
property validation_rules: CreditCardValidationRules | None
Object containing specific validation rules for creditCard.

Type: onlinepayments.sdk.domain.credit_card_validation_rules.CreditCardValidationRules

class onlinepayments.sdk.domain.credit_card_validation_rules.CreditCardValidationRules[source]

Bases: DataObject

__annotations__ = {'_CreditCardValidationRules__cvv_mandatory_for_existing_token': typing.Optional[bool], '_CreditCardValidationRules__cvv_mandatory_for_new_token': typing.Optional[bool]}
property cvv_mandatory_for_existing_token: bool | None
Determines whether the Card Verification Value must be provided for existing tokens. This option overrides the payment method configuration for the session.

Type: bool

property cvv_mandatory_for_new_token: bool | None
Determines whether the Card Verification Value must be provided for new tokens. This option overrides the payment method configuration for the session.

Type: bool

from_dictionary(dictionary: dict) CreditCardValidationRules[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.crm_token.CrmToken[source]

Bases: DataObject

__annotations__ = {'_CrmToken__unique_account_identifier': typing.Optional[str], '_CrmToken__unique_card_identifier': typing.Optional[str]}
from_dictionary(dictionary: dict) CrmToken[source]
to_dictionary() dict[source]
property unique_account_identifier: str | None
A unique identifier that remains constant across different formats of the same card (whether used via wallets such as Apple Pay, Google Pay, etc., or the physical card), even if the tokenID may differ. The unique account identifier cannot be used to trigger a payment.

Type: str

property unique_card_identifier: str | None
A unique identifier for the card that was tokenized. This identifier remains the same for a given card, even if the tokenID may differ. The unique card identifier cannot be used to trigger a payment.

Type: str

class onlinepayments.sdk.domain.currency_conversion.CurrencyConversion[source]

Bases: DataObject

__annotations__ = {'_CurrencyConversion__accepted_by_user': typing.Optional[bool], '_CurrencyConversion__proposal': typing.Optional[onlinepayments.sdk.domain.dcc_proposal.DccProposal]}
property accepted_by_user: bool | None
Dynamic Currency Conversion(DCC) Proposal accepted by user

Type: bool

from_dictionary(dictionary: dict) CurrencyConversion[source]
property proposal: DccProposal | None
Details of currency conversion to be proposed to the cardholder

Type: onlinepayments.sdk.domain.dcc_proposal.DccProposal

to_dictionary() dict[source]
class onlinepayments.sdk.domain.currency_conversion_input.CurrencyConversionInput[source]

Bases: DataObject

__annotations__ = {'_CurrencyConversionInput__accepted_by_user': typing.Optional[bool], '_CurrencyConversionInput__dcc_session_id': typing.Optional[str]}
property accepted_by_user: bool | None
Dynamic Currency Conversion(DCC) Proposal accepted by user

Type: bool

property dcc_session_id: str | None
Dynamic Currency Conversion(DCC) Session Id that was previously returned by rate enquiry (/dccrate).

Type: str

from_dictionary(dictionary: dict) CurrencyConversionInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.currency_conversion_request.CurrencyConversionRequest[source]

Bases: DataObject

__annotations__ = {'_CurrencyConversionRequest__card_source': typing.Optional[onlinepayments.sdk.domain.dcc_card_source.DccCardSource], '_CurrencyConversionRequest__transaction': typing.Optional[onlinepayments.sdk.domain.transaction.Transaction]}
property card_source: DccCardSource | None

Type: onlinepayments.sdk.domain.dcc_card_source.DccCardSource

from_dictionary(dictionary: dict) CurrencyConversionRequest[source]
to_dictionary() dict[source]
property transaction: Transaction | None

Type: onlinepayments.sdk.domain.transaction.Transaction

class onlinepayments.sdk.domain.currency_conversion_response.CurrencyConversionResponse[source]

Bases: DataObject

__annotations__ = {'_CurrencyConversionResponse__dcc_session_id': typing.Optional[str], '_CurrencyConversionResponse__proposal': typing.Optional[onlinepayments.sdk.domain.dcc_proposal.DccProposal], '_CurrencyConversionResponse__result': typing.Optional[onlinepayments.sdk.domain.currency_conversion_result.CurrencyConversionResult]}
property dcc_session_id: str | None
The identifier of the Dynamic Currency Conversion(DCC) session that has been created. ‘dccSessionId’ will be populated exclusively when the result is “Allowed” for other outcomes such as “InvalidCard”, “InvalidMerchant”, “NoRate” or “NotAvailable” this field value will be an empty string.

Type: str

from_dictionary(dictionary: dict) CurrencyConversionResponse[source]
property proposal: DccProposal | None
Details of currency conversion to be proposed to the cardholder

Type: onlinepayments.sdk.domain.dcc_proposal.DccProposal

property result: CurrencyConversionResult | None
Result of a requested currency conversion

Type: onlinepayments.sdk.domain.currency_conversion_result.CurrencyConversionResult

to_dictionary() dict[source]
class onlinepayments.sdk.domain.currency_conversion_result.CurrencyConversionResult[source]

Bases: DataObject

__annotations__ = {'_CurrencyConversionResult__result': typing.Optional[str], '_CurrencyConversionResult__result_reason': typing.Optional[str]}
from_dictionary(dictionary: dict) CurrencyConversionResult[source]
property result: str | None
Functional response to the request:
  • Allowed: Dynamic currency conversion may be offered to the cardholder

  • InvalidCard: The card is not valid for dynamic currency conversion

  • InvalidMerchant: The card acceptor has not been recognised

  • NoRate: Exchange rates are not available

  • NotAvailable: Dynamic currency conversion is not available for other reason

Type: str

property result_reason: str | None
Plain text explaining the result of the currency conversion request

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.currency_conversion_specific_input.CurrencyConversionSpecificInput[source]

Bases: DataObject

__annotations__ = {'_CurrencyConversionSpecificInput__dcc_enabled': typing.Optional[bool]}
property dcc_enabled: bool | None
Indicates if this transaction is Dynamic Currency Conversion (DCC) enabled.
  • true - Dynamic Currency Conversion (DCC) is enabled in this transaction.

  • false - Dynamic Currency Conversion (DCC) is disabled in this transaction. The default value for this property is false.

Type: bool

from_dictionary(dictionary: dict) CurrencyConversionSpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer.Customer[source]

Bases: DataObject

__annotations__ = {'_Customer__account': typing.Optional[onlinepayments.sdk.domain.customer_account.CustomerAccount], '_Customer__account_type': typing.Optional[str], '_Customer__billing_address': typing.Optional[onlinepayments.sdk.domain.address.Address], '_Customer__company_information': typing.Optional[onlinepayments.sdk.domain.company_information.CompanyInformation], '_Customer__contact_details': typing.Optional[onlinepayments.sdk.domain.contact_details.ContactDetails], '_Customer__device': typing.Optional[onlinepayments.sdk.domain.customer_device.CustomerDevice], '_Customer__fiscal_number': typing.Optional[str], '_Customer__locale': typing.Optional[str], '_Customer__merchant_customer_id': typing.Optional[str], '_Customer__personal_information': typing.Optional[onlinepayments.sdk.domain.personal_information.PersonalInformation]}
property account: CustomerAccount | None
Object containing data related to the account the customer has with you

Type: onlinepayments.sdk.domain.customer_account.CustomerAccount

property account_type: str | None
Type of the customer account that is used to place this order. Can have one of the following values:
  • none - The account that was used to place the order with is a guest account or no account was used at all

  • created - The customer account was created during this transaction

  • existing - The customer account was an already existing account prior to this transaction

Type: str

property billing_address: Address | None
Object containing billing address details.

Type: onlinepayments.sdk.domain.address.Address

property company_information: CompanyInformation | None
Object containing company information

Type: onlinepayments.sdk.domain.company_information.CompanyInformation

property contact_details: ContactDetails | None
Object containing contact details like email address and phone number

Type: onlinepayments.sdk.domain.contact_details.ContactDetails

property device: CustomerDevice | None
Object containing information on the device and browser of the customer

Type: onlinepayments.sdk.domain.customer_device.CustomerDevice

property fiscal_number: str | None
Fiscal registration number of the customer or the tax registration number of the company for a business customer. Please find below specifics per country:
  • Brazil - Consumer (CPF) with a length of 11 digits

  • Brazil - Company (CNPJ) with a length of 14 digits

  • Denmark - Consumer (CPR-nummer or personnummer) with a length of 10 digits

  • Finland - Consumer (Finnish: henkilötunnus (abbreviated as HETU), Swedish: personbeteckning) with a length of 11 characters

  • Norway - Consumer (fødselsnummer) with a length of 11 digits

  • Sweden - Consumer (personnummer) with a length of 10 or 12 digits

Type: str

from_dictionary(dictionary: dict) Customer[source]
property locale: str | None
The locale that the customer should be addressed in (for 3rd parties). Note that some third party providers only support the languageCode part of the locale, in those cases we will only use part of the locale provided.

Type: str

property merchant_customer_id: str | None
Your identifier for the customer. It is used in the fraud-screening process for payments on the payment platform.

Type: str

property personal_information: PersonalInformation | None
Object containing personal information like name, date of birth and gender.

Type: onlinepayments.sdk.domain.personal_information.PersonalInformation

to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer_account.CustomerAccount[source]

Bases: DataObject

__annotations__ = {'_CustomerAccount__authentication': typing.Optional[onlinepayments.sdk.domain.customer_account_authentication.CustomerAccountAuthentication], '_CustomerAccount__change_date': typing.Optional[str], '_CustomerAccount__changed_during_checkout': typing.Optional[bool], '_CustomerAccount__create_date': typing.Optional[str], '_CustomerAccount__had_suspicious_activity': typing.Optional[bool], '_CustomerAccount__password_change_date': typing.Optional[str], '_CustomerAccount__password_changed_during_checkout': typing.Optional[bool], '_CustomerAccount__payment_account_on_file': typing.Optional[onlinepayments.sdk.domain.payment_account_on_file.PaymentAccountOnFile], '_CustomerAccount__payment_activity': typing.Optional[onlinepayments.sdk.domain.customer_payment_activity.CustomerPaymentActivity]}
property authentication: CustomerAccountAuthentication | None
Object containing data on the authentication used by the customer to access their account

Type: onlinepayments.sdk.domain.customer_account_authentication.CustomerAccountAuthentication

property change_date: str | None
The last date (YYYYMMDD) on which the customer made changes to their account with you. These are changes to billing & shipping address details, new payment account (tokens), or new users(s) added.

Type: str

property changed_during_checkout: bool | None
  • true = the customer made changes to their account during this checkout

  • false = the customer did nnot change anything to their account during this checkout/n

The changes ment here are changes to billing & shipping address details, new payment account (tokens), or new users(s) added.

Type: bool

property create_date: str | None
The date (YYYYMMDD) on which the customer created their account with you

Type: str

from_dictionary(dictionary: dict) CustomerAccount[source]
property had_suspicious_activity: bool | None
Specifies if you have experienced suspicious activity on the account of the customer

true = you have experienced suspicious activity (including previous fraud) on the customer account used for this transaction

false = you have experienced no suspicious activity (including previous fraud) on the customer account used for this transaction

Type: bool

property password_change_date: str | None
The last date (YYYYMMDD) on which the customer changed their password for the account used in this transaction

Type: str

property password_changed_during_checkout: bool | None
Indicates if the password of an account is changed during this checkout

true = the customer made changes to their password of the account used during this checkout

false = the customer did not change anything to their password of the account used during this checkout

Type: bool

property payment_account_on_file: PaymentAccountOnFile | None
Object containing information on the payment account data on file (tokens)

Type: onlinepayments.sdk.domain.payment_account_on_file.PaymentAccountOnFile

property payment_activity: CustomerPaymentActivity | None
Object containing data on the purchase history of the customer with you

Type: onlinepayments.sdk.domain.customer_payment_activity.CustomerPaymentActivity

to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer_account_authentication.CustomerAccountAuthentication[source]

Bases: DataObject

__annotations__ = {'_CustomerAccountAuthentication__data': typing.Optional[str], '_CustomerAccountAuthentication__method': typing.Optional[str], '_CustomerAccountAuthentication__utc_timestamp': typing.Optional[str]}
property data: str | None
Data about the authentication procedure of the customer to their account with you

Type: str

from_dictionary(dictionary: dict) CustomerAccountAuthentication[source]
property method: str | None
Authentication used by the customer on your website Possible values are
  • guest = no login occurred, customer is logged in as guest

  • merchant-credentials = the customer logged in using credentials that are specific to you

  • federated-id = the customer logged in using a federated ID

  • issuer-credentials = the customer logged in using credentials from the card issuer (of the card used in this transaction)

  • third-party-authentication = the customer logged in using third-party authentication

  • fido-authentication = the customer logged in using a FIDO authenticator

  • cico-b-connect-token = the customer logged in using Check-in/Check-out b.connect

Type: str

to_dictionary() dict[source]
property utc_timestamp: str | None
Timestamp (YYYYMMDDHHmm) of the authentication of the customer to their account with you

Type: str

class onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount[source]

Bases: DataObject

__annotations__ = {'_CustomerBankAccount__account_holder_name': typing.Optional[str], '_CustomerBankAccount__bic': typing.Optional[str], '_CustomerBankAccount__iban': typing.Optional[str]}
property account_holder_name: str | None
Name of account holder

Type: str

property bic: str | None
Bank Identification Code

Type: str

from_dictionary(dictionary: dict) CustomerBankAccount[source]
property iban: str | None
The IBAN is the International Bank Account Number. It is an internationally agreed format for the BBAN and includes the ISO country code and two check digits.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer_device.CustomerDevice[source]

Bases: DataObject

__annotations__ = {'_CustomerDevice__accept_header': typing.Optional[str], '_CustomerDevice__browser_data': typing.Optional[onlinepayments.sdk.domain.browser_data.BrowserData], '_CustomerDevice__device_fingerprint': typing.Optional[str], '_CustomerDevice__ip_address': typing.Optional[str], '_CustomerDevice__locale': typing.Optional[str], '_CustomerDevice__timezone_offset_utc_minutes': typing.Optional[str], '_CustomerDevice__user_agent': typing.Optional[str]}
property accept_header: str | None
The accept-header of the customer client from the HTTP Headers.

Type: str

property browser_data: BrowserData | None
Object containing information regarding the browser of the customer

Type: onlinepayments.sdk.domain.browser_data.BrowserData

property device_fingerprint: str | None
The session ID for the device fingerprint must match the one sent in the device fingerprint script.

Type: str

from_dictionary(dictionary: dict) CustomerDevice[source]
property ip_address: str | None
The IP address of the customer client from the HTTP Headers.

Type: str

property locale: str | None
Locale of the client device/browser. Returned in the browser from the navigator.language property.

If you use the latest version of our JavaScript Client SDK, we will collect this data and include it in the encryptedCustomerInput property. We will then automatically populate this data if available.

Type: str

property timezone_offset_utc_minutes: str | None
Offset in minutes of timezone of the client versus the UTC. Value is returned by the JavaScript getTimezoneOffset() Method.

If you use the latest version of our JavaScript Client SDK, we will collect this data and include it in the encryptedCustomerInput property. We will then automatically populate this data if available.

Type: str

to_dictionary() dict[source]
property user_agent: str | None
User-Agent of the client device/browser from the HTTP Headers.

As a fall-back we will use the userAgent that might be included in the encryptedCustomerInput, but this is captured client side using JavaScript and might be different.

Type: str

class onlinepayments.sdk.domain.customer_device_output.CustomerDeviceOutput[source]

Bases: DataObject

__annotations__ = {'_CustomerDeviceOutput__ip_address_country_code': typing.Optional[str]}
from_dictionary(dictionary: dict) CustomerDeviceOutput[source]
property ip_address_country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer_output.CustomerOutput[source]

Bases: DataObject

__annotations__ = {'_CustomerOutput__device': typing.Optional[onlinepayments.sdk.domain.customer_device_output.CustomerDeviceOutput]}
property device: CustomerDeviceOutput | None
Object containing information on the device and browser of the customer

Type: onlinepayments.sdk.domain.customer_device_output.CustomerDeviceOutput

from_dictionary(dictionary: dict) CustomerOutput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer_payment_activity.CustomerPaymentActivity[source]

Bases: DataObject

__annotations__ = {'_CustomerPaymentActivity__number_of_payment_attempts_last24_hours': typing.Optional[int], '_CustomerPaymentActivity__number_of_payment_attempts_last_year': typing.Optional[int], '_CustomerPaymentActivity__number_of_purchases_last6_months': typing.Optional[int]}
from_dictionary(dictionary: dict) CustomerPaymentActivity[source]
property number_of_payment_attempts_last24_hours: int | None
Number of payment attempts (so including unsuccessful ones) made by this customer with you in the last 24 hours

Type: int

property number_of_payment_attempts_last_year: int | None
Number of payment attempts (so including unsuccessful ones) made by this customer with you in the last 12 months

Type: int

property number_of_purchases_last6_months: int | None
Number of successful purchases made by this customer with you in the last 6 months

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.customer_token.CustomerToken[source]

Bases: DataObject

__annotations__ = {'_CustomerToken__billing_address': typing.Optional[onlinepayments.sdk.domain.address.Address], '_CustomerToken__company_information': typing.Optional[onlinepayments.sdk.domain.company_information.CompanyInformation], '_CustomerToken__personal_information': typing.Optional[onlinepayments.sdk.domain.personal_information_token.PersonalInformationToken]}
property billing_address: Address | None
Object containing billing address details.

Type: onlinepayments.sdk.domain.address.Address

property company_information: CompanyInformation | None
Object containing company information

Type: onlinepayments.sdk.domain.company_information.CompanyInformation

from_dictionary(dictionary: dict) CustomerToken[source]
property personal_information: PersonalInformationToken | None

Type: onlinepayments.sdk.domain.personal_information_token.PersonalInformationToken

to_dictionary() dict[source]
class onlinepayments.sdk.domain.dcc_card_source.DccCardSource[source]

Bases: DataObject

__annotations__ = {'_DccCardSource__card': typing.Optional[onlinepayments.sdk.domain.card_info.CardInfo], '_DccCardSource__encrypted_customer_input': typing.Optional[str], '_DccCardSource__hosted_tokenization_id': typing.Optional[str], '_DccCardSource__token': typing.Optional[str]}
property card: CardInfo | None

Type: onlinepayments.sdk.domain.card_info.CardInfo

property encrypted_customer_input: str | None
Data that was encrypted client side containing all customer entered data elements like card data. Note: Because this data can only be submitted once to our system and contains encrypted card data you should not store it. As the data was captured within the context of a client session you also need to submit it to us before the session has expired.

Type: str

from_dictionary(dictionary: dict) DccCardSource[source]
property hosted_tokenization_id: str | None
An Id of a hosted tokenization session

Type: str

to_dictionary() dict[source]
property token: str | None
An identifier that represents card details that have previously been stored

Type: str

class onlinepayments.sdk.domain.dcc_proposal.DccProposal[source]

Bases: DataObject

__annotations__ = {'_DccProposal__base_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_DccProposal__disclaimer_display': typing.Optional[str], '_DccProposal__disclaimer_receipt': typing.Optional[str], '_DccProposal__rate': typing.Optional[onlinepayments.sdk.domain.rate_details.RateDetails], '_DccProposal__target_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney]}
property base_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property disclaimer_display: str | None
Card scheme disclaimer to present to the cardholder

Type: str

property disclaimer_receipt: str | None
Card scheme disclaimer to print within cardholder receipt

Type: str

from_dictionary(dictionary: dict) DccProposal[source]
property rate: RateDetails | None

Type: onlinepayments.sdk.domain.rate_details.RateDetails

property target_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

to_dictionary() dict[source]
class onlinepayments.sdk.domain.decrypted_payment_data.DecryptedPaymentData[source]

Bases: DataObject

__annotations__ = {'_DecryptedPaymentData__cardholder_name': typing.Optional[str], '_DecryptedPaymentData__cryptogram': typing.Optional[str], '_DecryptedPaymentData__dpan': typing.Optional[str], '_DecryptedPaymentData__eci': typing.Optional[int], '_DecryptedPaymentData__expiry_date': typing.Optional[str]}
property cardholder_name: str | None
Card holder’s name on the card.
  • For Apple Pay, maps to the cardholderName property in the encrypted payment data.

Type: str

property cryptogram: str | None
The 3D secure online payment cryptogram.
  • For Apple Pay, maps to the paymentData.onlinePaymentCryptogram property in the encrypted payment data.

  • For Google Pay, maps to the paymentMethodDetails.3dsCryptogram property in the encrypted payment data. Not allowed for Google Pay if the paymentMethod is CARD.

Type: str

property dpan: str | None
The device specific PAN.
  • For Apple Pay, maps to the applicationPrimaryAccountNumber property in the encrypted payment.

Type: str

property eci: int | None
Electronic Commerce Indicator.
  • For Apple Pay, maps to the paymentData.eciIndicator property in the encrypted payment data.

Type: int

property expiry_date: str | None
Expiry date of the card Format: MMYY.
  • For Apple Pay, maps to the applicationExpirationDate property in the encrypted payment data. This property is formatted as YYMMDD, so this needs to be converted to get a correctly formatted expiry date

Type: str

from_dictionary(dictionary: dict) DecryptedPaymentData[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.directory_entry.DirectoryEntry[source]

Bases: DataObject

__annotations__ = {'_DirectoryEntry__issuer_id': typing.Optional[str], '_DirectoryEntry__issuer_list': typing.Optional[str], '_DirectoryEntry__issuer_name': typing.Optional[str]}
from_dictionary(dictionary: dict) DirectoryEntry[source]
property issuer_id: str | None
Deprecated. Unique ID of the issuing bank of the customer

Type: str

property issuer_list: str | None
To be used to sort the issuers. short - These issuers should be presented at the top of the list long - These issuers should be presented after the issuers marked as short Note this is only filled if supported by the payment product. Currently only iDeal (809) support this. Sorting within the groups should be done alphabetically

Type: str

property issuer_name: str | None
Name of the issuing bank as it should be presented to the customer

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.discount.Discount[source]

Bases: DataObject

__annotations__ = {'_Discount__amount': typing.Optional[int]}
property amount: int | None
Amount in the smallest currency unit, i.e.:
  • EUR is a 2-decimals currency, the value 1234 will result in EUR 12.34

  • KWD is a 3-decimals currency, the value 1234 will result in KWD 1.234

  • JPY is a zero-decimal currency, the value 1234 will result in JPY 1234

Type: int

from_dictionary(dictionary: dict) Discount[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.empty_validator.EmptyValidator[source]

Bases: DataObject

__annotations__ = {}
from_dictionary(dictionary: dict) EmptyValidator[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.error_response.ErrorResponse[source]

Bases: DataObject

__annotations__ = {'_ErrorResponse__error_id': typing.Optional[str], '_ErrorResponse__errors': typing.Optional[typing.List[onlinepayments.sdk.domain.api_error.APIError]]}
property error_id: str | None
Unique reference, for debugging purposes, of this error response

Type: str

property errors: List[APIError] | None
List of one or more errors

Type: list[onlinepayments.sdk.domain.api_error.APIError]

from_dictionary(dictionary: dict) ErrorResponse[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.external_cardholder_authentication_data.ExternalCardholderAuthenticationData[source]

Bases: DataObject

__annotations__ = {'_ExternalCardholderAuthenticationData__acs_transaction_id': typing.Optional[str], '_ExternalCardholderAuthenticationData__applied_exemption': typing.Optional[str], '_ExternalCardholderAuthenticationData__cavv': typing.Optional[str], '_ExternalCardholderAuthenticationData__cavv_algorithm': typing.Optional[str], '_ExternalCardholderAuthenticationData__directory_server_transaction_id': typing.Optional[str], '_ExternalCardholderAuthenticationData__eci': typing.Optional[int], '_ExternalCardholderAuthenticationData__flow': typing.Optional[str], '_ExternalCardholderAuthenticationData__scheme_risk_score': typing.Optional[int], '_ExternalCardholderAuthenticationData__three_d_secure_version': typing.Optional[str], '_ExternalCardholderAuthenticationData__xid': typing.Optional[str]}
property acs_transaction_id: str | None
Identifier of the authenticated transaction at the ACS/Issuer.

Type: str

property applied_exemption: str | None
Exemption code from Carte Bancaire (130) (unknown possible values so far -free format).

Type: str

property cavv: str | None
The CAVV (cardholder authentication verification value) or AAV (accountholder authentication value) provides an authentication validation value. Note: This is mandatory for ECI 2 and 5.

Type: str

property cavv_algorithm: str | None
The algorithm, from your 3D Secure provider, used to generate the authentication CAVV. Note: Required when
  • The 3D Secure authentication for the transaction is managed by a third-party 3D Secure authentication provider

  • You process the transaction through Atos

Type: str

property directory_server_transaction_id: str | None
The 3-D Secure Directory Server transaction ID that is used for the 3D Authentication Example: d4c849f8-24c6-4673-bf34-d0f822c81b16

Type: str

property eci: int | None
Electronic Commerce Indicator provides authentication validation results returned after AUTHENTICATIONVALIDATION
  • 0 = No authentication, Internet (no liability shift, not a 3D Secure transaction)

  • 1 = Authentication attempted (MasterCard)

  • 2 = Successful authentication (MasterCard)

  • 5 = Successful authentication (Visa, Diners Club, Amex)

  • 6 = Authentication attempted (Visa, Diners Club, Amex)

  • 7 = No authentication, Internet (no liability shift, not a 3D Secure transaction)

  • (empty) = Not checked or not enrolled

Type: int

property flow: str | None
3D Secure Flow used during this transaction.

Type: str

from_dictionary(dictionary: dict) ExternalCardholderAuthenticationData[source]
property scheme_risk_score: int | None
Global score calculated by the Carte Bancaire (130) Scoring platform. Possible values from 0 to 99.

Type: int

property three_d_secure_version: str | None
The 3-D Secure version used for the authentication. Possible values:
  • v1

  • v2

  • 1.0.2

  • 2.1.0

  • 2.2.0

Type: str

to_dictionary() dict[source]
property xid: str | None
The transaction ID that is used for the 3D Authentication

Type: str

class onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked[source]

Bases: DataObject

__annotations__ = {'_ExternalTokenLinked__computed_token': typing.Optional[str], '_ExternalTokenLinked__generated_token': typing.Optional[str], '_ExternalTokenLinked__gts_computed_token': typing.Optional[str]}
property computed_token: str | None
The computed token

Type: str

from_dictionary(dictionary: dict) ExternalTokenLinked[source]
property generated_token: str | None
The generated token

Type: str

property gts_computed_token: str | None
Deprecated: Use the field ComputedToken instead.

Type: str

Deprecated; Use the field ComputedToken instead.

to_dictionary() dict[source]
class onlinepayments.sdk.domain.feedbacks.Feedbacks[source]

Bases: DataObject

__annotations__ = {'_Feedbacks__webhook_url': typing.Optional[str], '_Feedbacks__webhooks_urls': typing.Optional[typing.List[str]]}
from_dictionary(dictionary: dict) Feedbacks[source]
to_dictionary() dict[source]
property webhook_url: str | None
The URL where the webhook will be dispatched for all status change events related to this payment.

Type: str

Deprecated; The URL where the webhook will be dispatched for all status change events related to this payment.

property webhooks_urls: List[str] | None
The list of the URLs where the webhook will be dispatched for all status change events related to this payment.

Type: list[str]

class onlinepayments.sdk.domain.fixed_list_validator.FixedListValidator[source]

Bases: DataObject

__annotations__ = {'_FixedListValidator__allowed_values': typing.Optional[typing.List[str]]}
property allowed_values: List[str] | None

Type: list[str]

from_dictionary(dictionary: dict) FixedListValidator[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.fraud_fields.FraudFields[source]

Bases: DataObject

__annotations__ = {'_FraudFields__black_list_data': typing.Optional[str], '_FraudFields__customer_ip_address': typing.Optional[str], '_FraudFields__product_categories': typing.Optional[typing.List[str]]}
property black_list_data: str | None
Additional black list input

Type: str

property customer_ip_address: str | None
Deprecated: Use order.customer.device.ipAddress instead.

The IP Address of the customer that is making the payment

Type: str

Deprecated; Use order.customer.device.ipAddress instead. The IP Address of the customer that is making the payment

from_dictionary(dictionary: dict) FraudFields[source]
property product_categories: List[str] | None
List of product categories that are being purchased.

Type: list[str]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.fraud_results.FraudResults[source]

Bases: DataObject

__annotations__ = {'_FraudResults__fraud_service_result': typing.Optional[str]}
property fraud_service_result: str | None
Resulting advice of the fraud prevention checks. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted

  • challenged - Based on the checks performed the transaction should be manually reviewed

  • denied - Based on the checks performed the transaction should be rejected

  • no-advice - No fraud check was requested/performed

  • error - The fraud check resulted an error. Note that the fraud check was thus not performed.

Type: str

from_dictionary(dictionary: dict) FraudResults[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.g_pay_three_d_secure.GPayThreeDSecure[source]

Bases: DataObject

__annotations__ = {'_GPayThreeDSecure__challenge_canvas_size': typing.Optional[str], '_GPayThreeDSecure__challenge_indicator': typing.Optional[str], '_GPayThreeDSecure__exemption_request': typing.Optional[str], '_GPayThreeDSecure__redirection_data': typing.Optional[onlinepayments.sdk.domain.redirection_data.RedirectionData], '_GPayThreeDSecure__skip_authentication': typing.Optional[bool], '_GPayThreeDSecure__skip_soft_decline': typing.Optional[bool]}
property challenge_canvas_size: str | None
Dimensions of the challenge window that potentially will be displayed to the customer. The challenge content is formatted to appropriately render in this window to provide the best possible user experience. Preconfigured sizes are width x height in pixels of the window displayed in the customer browser window. Possible values are
  • 250x400 (default)

  • 390x400

  • 500x600

  • 600x400

  • full-screen

Type: str

property challenge_indicator: str | None
Allows you to indicate if you want the customer to be challenged for extra security on this transaction. Possible values:
  • no-preference - You have no preference whether or not to challenge the customer (default)

  • no-challenge-requested - you prefer the cardholder not to be challenged

  • challenge-requested - you prefer the customer to be challenged

  • challenge-required - you require the customer to be challenged

  • no-challenge-requested-risk-analysis-performed – letting the issuer know that you have already assessed the transaction with fraud prevention tool

  • no-challenge-requested-data-share-only – sharing data only with the DS

  • no-challenge-requested-consumer-authentication-performed – authentication already happened at your side – when login in to your website

  • no-challenge-requested-use-whitelist-exemption – cardholder has whitelisted you at with the issuer

  • challenge-requested-whitelist-prompt-requested – cardholder is trying to whitelist you

  • request-scoring-without-connecting-to-acs – sending information to CB DS for a fraud scoring

Type: str

property exemption_request: str | None
In PSD2, the ExemptionRequest field is used by merchants requesting an exemption when not using authentication on a transaction, in order to keep the conversion up.
  • none = No exemption requested

  • transaction-risk-analysis = Fraud analysis has been done already by your own fraud module and transaction scored as low risk

  • low-value = Bellow 30 euros

  • whitelist = The cardholder has whitelisted you with their issuer

Type: str

from_dictionary(dictionary: dict) GPayThreeDSecure[source]
property redirection_data: RedirectionData | None
Object containing browser specific redirection related data

Type: onlinepayments.sdk.domain.redirection_data.RedirectionData

property skip_authentication: bool | None
  • true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to “recurring”

  • false = 3D Secure authentication will not be skipped for this transaction

Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction

Type: bool

property skip_soft_decline: bool | None
  • true = Soft Decline retry mechanism will be skipped for this transaction. The transaction will result in “Authorization Declined” status. This setting should be used when skipAuthentication is set to true and the merchant does not want to use Soft Decline retry mechanism.

  • false = Soft Decline retry mechanism will not be skipped for this transaction.

Note: skipSoftDecline defaults to false if empty. This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction.

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.get_hosted_checkout_response.GetHostedCheckoutResponse[source]

Bases: DataObject

__annotations__ = {'_GetHostedCheckoutResponse__created_payment_output': typing.Optional[onlinepayments.sdk.domain.created_payment_output.CreatedPaymentOutput], '_GetHostedCheckoutResponse__status': typing.Optional[str]}
property created_payment_output: CreatedPaymentOutput | None
This object will return the details of the payment after the payment is cancelled by the customer, rejected or authorized

Type: onlinepayments.sdk.domain.created_payment_output.CreatedPaymentOutput

from_dictionary(dictionary: dict) GetHostedCheckoutResponse[source]
property status: str | None
This is the status of the hosted checkout. Possible values are:
  • IN_PROGRESS - The checkout is still in progress and has not finished yet

  • PAYMENT_CREATED - A payment has been created

  • CANCELLED_BY_CONSUMER - The HostedCheckout session have been cancelled by the customer

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.get_hosted_tokenization_response.GetHostedTokenizationResponse[source]

Bases: DataObject

__annotations__ = {'_GetHostedTokenizationResponse__token': typing.Optional[onlinepayments.sdk.domain.token_response.TokenResponse], '_GetHostedTokenizationResponse__token_status': typing.Optional[str]}
from_dictionary(dictionary: dict) GetHostedTokenizationResponse[source]
to_dictionary() dict[source]
property token: TokenResponse | None

Type: onlinepayments.sdk.domain.token_response.TokenResponse

property token_status: str | None
This is the status of the token in the hosted tokenization session. Possible values are:
  • UNCHANGED - The token has not changed

  • CREATED - The token has been created

  • UPDATED - The token has been updated

Type: str

class onlinepayments.sdk.domain.get_iin_details_request.GetIINDetailsRequest[source]

Bases: DataObject

__annotations__ = {'_GetIINDetailsRequest__bin': typing.Optional[str], '_GetIINDetailsRequest__payment_context': typing.Optional[onlinepayments.sdk.domain.payment_context.PaymentContext]}
property bin: str | None
The first digits of the credit card number from left to right with a minimum of 6 digits. Providing additional digits (up to 19) can result in more co-brands being returned.

Type: str

from_dictionary(dictionary: dict) GetIINDetailsRequest[source]
property payment_context: PaymentContext | None

Type: onlinepayments.sdk.domain.payment_context.PaymentContext

to_dictionary() dict[source]
class onlinepayments.sdk.domain.get_iin_details_response.GetIINDetailsResponse[source]

Bases: DataObject

__annotations__ = {'_GetIINDetailsResponse__card_corporate_indicator': typing.Optional[bool], '_GetIINDetailsResponse__card_effective_date': typing.Optional[datetime.date], '_GetIINDetailsResponse__card_effective_date_indicator': typing.Optional[bool], '_GetIINDetailsResponse__card_pan_type': typing.Optional[str], '_GetIINDetailsResponse__card_product_code': typing.Optional[str], '_GetIINDetailsResponse__card_product_name': typing.Optional[str], '_GetIINDetailsResponse__card_product_usage_label': typing.Optional[str], '_GetIINDetailsResponse__card_scheme': typing.Optional[str], '_GetIINDetailsResponse__card_type': typing.Optional[str], '_GetIINDetailsResponse__co_brands': typing.Optional[typing.List[onlinepayments.sdk.domain.iin_detail.IINDetail]], '_GetIINDetailsResponse__country_code': typing.Optional[str], '_GetIINDetailsResponse__is_allowed_in_context': typing.Optional[bool], '_GetIINDetailsResponse__issuer_code': typing.Optional[str], '_GetIINDetailsResponse__issuer_name': typing.Optional[str], '_GetIINDetailsResponse__issuer_region_code': typing.Optional[str], '_GetIINDetailsResponse__issuing_country_code': typing.Optional[str], '_GetIINDetailsResponse__pan_length_max': typing.Optional[int], '_GetIINDetailsResponse__pan_length_min': typing.Optional[int], '_GetIINDetailsResponse__pan_luhn_check': typing.Optional[bool], '_GetIINDetailsResponse__payment_product_id': typing.Optional[int], '_GetIINDetailsResponse__virtual_card_indicator': typing.Optional[bool]}
property card_corporate_indicator: bool | None
Indicates whether the card is an Enterprise / Commercial card or not

Type: bool

property card_effective_date: date | None
The card effective date (YYYY-MM-DD)

Type: date

property card_effective_date_indicator: bool | None
Indicator of existence of a card effective date

Type: bool

property card_pan_type: str | None
PAN type sent
  • dpan Digital PAN

  • pan Real PAN

Type: str

property card_product_code: str | None
Product code of the card

Type: str

property card_product_name: str | None
Product name of the card

Type: str

property card_product_usage_label: str | None
Profile name of the card which is displayed on payment electronic ticket in accordance with MPADS requirements
  • commercial Business card

  • credit Credit card

  • debit Debit card

  • prepaid Prepaid card

Type: str

property card_scheme: str | None
Network name associated with the card that is informational only and not to be coded against
  • AmericanExpress American Express scheme

  • Bancontact Bancontact scheme

  • Cb Cartes Bancaires scheme

  • Cup China UnionPay scheme

  • Dankort Dankort scheme

  • DinersDiscover Diners Discover scheme

  • Eftpos eftpos scheme

  • Jcb Japan Credit Bureau scheme

  • Mastercard Mastercard scheme

  • Oney Oney scheme

  • Uatp Universal Air Travel Plan scheme

  • Visa Visa scheme

Type: str

property card_type: str | None
The card’s type as categorised by the payment method. Possible values are:
  • Credit

  • Debit

  • Prepaid

Type: str

property co_brands: List[IINDetail] | None
List of IIN details

Type: list[onlinepayments.sdk.domain.iin_detail.IINDetail]

property country_code: str | None
The ISO 3166-1 alpha-2 country code of the card issuer. If we do not know the country of the card issuer, then the countryCode will return the value ‘99’.

Type: str

from_dictionary(dictionary: dict) GetIINDetailsResponse[source]
property is_allowed_in_context: bool | None
Populated only if you submitted a payment context.
  • true - The payment product is allowed in the submitted context.

  • false - The payment product is not allowed in the submitted context. Note that in this case, none of the brands of the card will be allowed in the submitted context.

Type: bool

property issuer_code: str | None
Issuer code of the card

Type: str

property issuer_name: str | None
Issuer name of the card

Type: str

property issuer_region_code: str | None
Region code of the card issuer
  • 1 USA: California, Hawaii, Nevada

  • 2 USA: West except California, Hawaii, Nevada

  • 3 USA: Central North

  • 4 USA: Central South

  • 5 USA: Great Lakes states

  • 6 USA: South East

  • 7 USA: Extreme North East

  • 8 USA: North East

  • 9 USA: Florida and Georgia

  • a Canada

  • b South America

  • c Oceania and Asia

  • d Europe

  • e Africa and Middle East

Type: str

property issuing_country_code: str | None
ISO 3166-1 alpha-2 country code in which the card has been issued

Type: str

property pan_length_max: int | None
Maximum length of the PAN

Type: int

property pan_length_min: int | None
Minimal length of the PAN

Type: int

property pan_luhn_check: bool | None
Indicates whether the PAN is controlled with Lühn Key algorithm

Type: bool

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
property virtual_card_indicator: bool | None
Indicates whether the card is a virtual card

Type: bool

class onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse[source]

Bases: DataObject

__annotations__ = {'_GetMandateResponse__mandate': typing.Optional[onlinepayments.sdk.domain.mandate_response.MandateResponse]}
from_dictionary(dictionary: dict) GetMandateResponse[source]
property mandate: MandateResponse | None
Object containing the created mandate.

Type: onlinepayments.sdk.domain.mandate_response.MandateResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.get_payment_product_groups_response.GetPaymentProductGroupsResponse[source]

Bases: DataObject

__annotations__ = {'_GetPaymentProductGroupsResponse__payment_product_groups': typing.Optional[typing.List[onlinepayments.sdk.domain.payment_product_group.PaymentProductGroup]]}
from_dictionary(dictionary: dict) GetPaymentProductGroupsResponse[source]
property payment_product_groups: List[PaymentProductGroup] | None

Type: list[onlinepayments.sdk.domain.payment_product_group.PaymentProductGroup]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.get_payment_products_response.GetPaymentProductsResponse[source]

Bases: DataObject

__annotations__ = {'_GetPaymentProductsResponse__payment_products': typing.Optional[typing.List[onlinepayments.sdk.domain.payment_product.PaymentProduct]]}
from_dictionary(dictionary: dict) GetPaymentProductsResponse[source]
property payment_products: List[PaymentProduct] | None

Type: list[onlinepayments.sdk.domain.payment_product.PaymentProduct]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.get_privacy_policy_response.GetPrivacyPolicyResponse[source]

Bases: DataObject

__annotations__ = {'_GetPrivacyPolicyResponse__html_content': typing.Optional[str]}
from_dictionary(dictionary: dict) GetPrivacyPolicyResponse[source]
property html_content: str | None
HTML content to be displayed to the user.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.gift_card_purchase.GiftCardPurchase[source]

Bases: DataObject

__annotations__ = {'_GiftCardPurchase__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_GiftCardPurchase__number_of_gift_cards': typing.Optional[int]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

from_dictionary(dictionary: dict) GiftCardPurchase[source]
property number_of_gift_cards: int | None
Number of gift cards that are purchased through this transaction

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.hosted_checkout_specific_input.HostedCheckoutSpecificInput[source]

Bases: DataObject

__annotations__ = {'_HostedCheckoutSpecificInput__allowed_number_of_payment_attempts': typing.Optional[int], '_HostedCheckoutSpecificInput__card_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.card_payment_method_specific_input_for_hosted_checkout.CardPaymentMethodSpecificInputForHostedCheckout], '_HostedCheckoutSpecificInput__is_new_unscheduled_card_on_file_series': typing.Optional[bool], '_HostedCheckoutSpecificInput__is_recurring': typing.Optional[bool], '_HostedCheckoutSpecificInput__locale': typing.Optional[str], '_HostedCheckoutSpecificInput__payment_product_filters': typing.Optional[onlinepayments.sdk.domain.payment_product_filters_hosted_checkout.PaymentProductFiltersHostedCheckout], '_HostedCheckoutSpecificInput__return_url': typing.Optional[str], '_HostedCheckoutSpecificInput__session_timeout': typing.Optional[int], '_HostedCheckoutSpecificInput__show_result_page': typing.Optional[bool], '_HostedCheckoutSpecificInput__split_payment_product_filters': typing.Optional[onlinepayments.sdk.domain.split_payment_product_filters_hosted_checkout.SplitPaymentProductFiltersHostedCheckout], '_HostedCheckoutSpecificInput__tokens': typing.Optional[str], '_HostedCheckoutSpecificInput__variant': typing.Optional[str]}
property allowed_number_of_payment_attempts: int | None
The maximum number of times a customer can try to pay before the payment is definitely declined. The value must be between 1 and 10. By default, the value is set to 10 attempts.

Type: int

property card_payment_method_specific_input: CardPaymentMethodSpecificInputForHostedCheckout | None
Object containing card payment specific data for hosted checkout

Type: onlinepayments.sdk.domain.card_payment_method_specific_input_for_hosted_checkout.CardPaymentMethodSpecificInputForHostedCheckout

from_dictionary(dictionary: dict) HostedCheckoutSpecificInput[source]
property is_new_unscheduled_card_on_file_series: bool | None
  • true - A new unscheduled credentials on file series will be started. You will be able to use the paymentID of this transaction to initiate subsequent merchant initiated transactions. In the EU, the current transaction should be authenticated.

  • false - Default. No new card on file series created.

Type: bool

property is_recurring: bool | None
  • true - Only payment products that support recurring payments will be shown. Any transactions created will also be tagged as being a first of a recurring sequence.

  • false - Only payment products that support one-off payments will be shown. The default value for this property is false.

Type: bool

property locale: str | None
Locale used in the GUI towards the consumer.

Type: str

property payment_product_filters: PaymentProductFiltersHostedCheckout | None
Contains the payment product ids and payment product groups that will be used for manipulating the payment products available for the payment to the customer.

Type: onlinepayments.sdk.domain.payment_product_filters_hosted_checkout.PaymentProductFiltersHostedCheckout

property return_url: str | None
The URL that the customer is redirect to after the payment flow has finished. You can add any number of key value pairs in the query string that, for instance help you to identify the customer when they return to your site. Please note that we will also append some additional key value pairs that will also help you with this identification process. Note: The provided URL should be absolute and contain the protocol to use, e.g. http:// or https://. For use on mobile devices a custom protocol can be used in the form of protocol://. This protocol must be registered on the device first. URLs without a protocol will be rejected.

Type: str

property session_timeout: int | None
The number of minutes after which the session will expire. By default, the value is set to 180 minutes.

Type: int

property show_result_page: bool | None
  • true - Default - Hosted Checkout will show a result page to the customer when applicable.

  • false - Hosted Checkout will redirect the customer back to the provided returnUrl when this is possible.

Type: bool

property split_payment_product_filters: SplitPaymentProductFiltersHostedCheckout | None
Contains the payment product IDs and payment product groups that will be used to manage the payment products available for the following payments in a split payment. Note that this filter is applied after the paymentProductFilter has been applied. It cannot be used to enable split payments with payment products that were not already allowed by paymentProductFilter.

Type: onlinepayments.sdk.domain.split_payment_product_filters_hosted_checkout.SplitPaymentProductFiltersHostedCheckout

to_dictionary() dict[source]
property tokens: str | None
String containing comma separated tokens (no spaces) associated with the customer of this hosted session. Valid tokens will be used to present the customer the option to re-use previously used payment details. This means the customer for instance does not have to re-enter their card details again, which a big plus when the customer is using their mobile phone to complete the operation.

Type: str

property variant: str | None
You can force the use of a custom template by specifying it in the variant field. This allows you to test out the effect of certain changes to your payment pages in a controlled manner. Please note that you need to specify the filename of the template or customization.

Type: str

class onlinepayments.sdk.domain.hosted_checkout_specific_output.HostedCheckoutSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_HostedCheckoutSpecificOutput__hosted_checkout_id': typing.Optional[str], '_HostedCheckoutSpecificOutput__variant': typing.Optional[str]}
from_dictionary(dictionary: dict) HostedCheckoutSpecificOutput[source]
property hosted_checkout_id: str | None
The ID of the Hosted Checkout Session in which the payment was made.

Type: str

to_dictionary() dict[source]
property variant: str | None
You can force the use of a custom template by specifying it in the variant field. This allows you to test out the effect of certain changes to your payment pages in a controlled manner. Please note that you need to specify the filename of the template or customization.

Type: str

class onlinepayments.sdk.domain.iin_detail.IINDetail[source]

Bases: DataObject

__annotations__ = {'_IINDetail__card_corporate_indicator': typing.Optional[bool], '_IINDetail__card_effective_date': typing.Optional[datetime.date], '_IINDetail__card_effective_date_indicator': typing.Optional[bool], '_IINDetail__card_pan_type': typing.Optional[str], '_IINDetail__card_product_code': typing.Optional[str], '_IINDetail__card_product_name': typing.Optional[str], '_IINDetail__card_product_usage_label': typing.Optional[str], '_IINDetail__card_scheme': typing.Optional[str], '_IINDetail__card_type': typing.Optional[str], '_IINDetail__country_code': typing.Optional[str], '_IINDetail__is_allowed_in_context': typing.Optional[bool], '_IINDetail__issuer_code': typing.Optional[str], '_IINDetail__issuer_name': typing.Optional[str], '_IINDetail__issuer_region_code': typing.Optional[str], '_IINDetail__issuing_country_code': typing.Optional[str], '_IINDetail__pan_length_max': typing.Optional[int], '_IINDetail__pan_length_min': typing.Optional[int], '_IINDetail__pan_luhn_check': typing.Optional[bool], '_IINDetail__payment_product_id': typing.Optional[int], '_IINDetail__virtual_card_indicator': typing.Optional[bool]}
property card_corporate_indicator: bool | None
Indicates whether the card is an Enterprise / Commercial card or not

Type: bool

property card_effective_date: date | None
The card effective date (YYYY-MM-DD)

Type: date

property card_effective_date_indicator: bool | None
Indicator of existence of a card effective date

Type: bool

property card_pan_type: str | None
PAN type sent
  • dpan Digital PAN

  • pan Real PAN

Type: str

property card_product_code: str | None
Product code of the card

Type: str

property card_product_name: str | None
Product name of the card

Type: str

property card_product_usage_label: str | None
Profile name of the card which is displayed on payment electronic ticket in accordance with MPADS requirements
  • commercial Business card

  • credit Credit card

  • debit Debit card

  • prepaid Prepaid card

Type: str

property card_scheme: str | None
Network name associated with the card that is informational only and not to be coded against
  • AmericanExpress American Express scheme

  • Bancontact Bancontact scheme

  • Cb Cartes Bancaires scheme

  • Cup China UnionPay scheme

  • Dankort Dankort scheme

  • DinersDiscover Diners Discover scheme

  • Eftpos eftpos scheme

  • Jcb Japan Credit Bureau scheme

  • Mastercard Mastercard scheme

  • Oney Oney scheme

  • Uatp Universal Air Travel Plan scheme

  • Visa Visa scheme

Type: str

property card_type: str | None
The card’s type as categorised by the payment method. Possible values are:
  • Credit

  • Debit

  • Prepaid

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code of the card issuer

Type: str

from_dictionary(dictionary: dict) IINDetail[source]
property is_allowed_in_context: bool | None
Populated only if you submitted a payment context.
  • true - The payment product is allowed in the submitted context.

  • false - The payment product is not allowed in the submitted context. Note that in this case, none of the brands of the card will be allowed in the submitted context.

Type: bool

property issuer_code: str | None
Issuer code of the card

Type: str

property issuer_name: str | None
Issuer name of the card

Type: str

property issuer_region_code: str | None
Region code of the card issuer
  • 1 USA: California, Hawaii, Nevada

  • 2 USA: West except California, Hawaii, Nevada

  • 3 USA: Central North

  • 4 USA: Central South

  • 5 USA: Great Lakes states

  • 6 USA: South East

  • 7 USA: Extreme North East

  • 8 USA: North East

  • 9 USA: Florida and Georgia

  • a Canada

  • b South America

  • c Oceania and Asia

  • d Europe

  • e Africa and Middle East

Type: str

property issuing_country_code: str | None
ISO 3166-1 alpha-2 country code in which the card has been issued

Type: str

property pan_length_max: int | None
Maximum length of the PAN

Type: int

property pan_length_min: int | None
Minimal length of the PAN

Type: int

property pan_luhn_check: bool | None
Indicates whether the PAN is controlled with Lühn Key algorithm

Type: bool

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
property virtual_card_indicator: bool | None
Indicates whether the card is a virtual card

Type: bool

class onlinepayments.sdk.domain.label_template_element.LabelTemplateElement[source]

Bases: DataObject

__annotations__ = {'_LabelTemplateElement__attribute_key': typing.Optional[str], '_LabelTemplateElement__mask': typing.Optional[str]}
property attribute_key: str | None
Name of the attribute that is shown to the customer on selection pages or screens

Type: str

from_dictionary(dictionary: dict) LabelTemplateElement[source]
property mask: str | None
Regular mask for the attributeKey Note: The mask is optional as not every field has a mask

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.length_validator.LengthValidator[source]

Bases: DataObject

__annotations__ = {'_LengthValidator__max_length': typing.Optional[int], '_LengthValidator__min_length': typing.Optional[int]}
from_dictionary(dictionary: dict) LengthValidator[source]
property max_length: int | None

Type: int

property min_length: int | None

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.line_item.LineItem[source]

Bases: DataObject

__annotations__ = {'_LineItem__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_LineItem__invoice_data': typing.Optional[onlinepayments.sdk.domain.line_item_invoice_data.LineItemInvoiceData], '_LineItem__order_line_details': typing.Optional[onlinepayments.sdk.domain.order_line_details.OrderLineDetails], '_LineItem__other_details': typing.Optional[onlinepayments.sdk.domain.other_details.OtherDetails]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

from_dictionary(dictionary: dict) LineItem[source]
property invoice_data: LineItemInvoiceData | None
Object containing the line items of the invoice or shopping cart

Type: onlinepayments.sdk.domain.line_item_invoice_data.LineItemInvoiceData

property order_line_details: OrderLineDetails | None
Object containing additional information that when supplied can have a beneficial effect on the discountrates

Type: onlinepayments.sdk.domain.order_line_details.OrderLineDetails

property other_details: OtherDetails | None
Other information for specific payment methods.

Type: onlinepayments.sdk.domain.other_details.OtherDetails

to_dictionary() dict[source]
class onlinepayments.sdk.domain.line_item_invoice_data.LineItemInvoiceData[source]

Bases: DataObject

__annotations__ = {'_LineItemInvoiceData__description': typing.Optional[str]}
property description: str | None
Shopping cart item description

Type: str

from_dictionary(dictionary: dict) LineItemInvoiceData[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.loan_recipient.LoanRecipient[source]

Bases: DataObject

__annotations__ = {'_LoanRecipient__account_number': typing.Optional[str], '_LoanRecipient__date_of_birth': typing.Optional[str], '_LoanRecipient__partial_pan': typing.Optional[str], '_LoanRecipient__surname': typing.Optional[str], '_LoanRecipient__zip': typing.Optional[str]}
property account_number: str | None
Should be filled with the last 10 digits of the bank account number of the recipient of the loan.

Type: str

property date_of_birth: str | None
The date of birth of the customer of the recipient of the loan. Format YYYYMMDD

Type: str

from_dictionary(dictionary: dict) LoanRecipient[source]
property partial_pan: str | None
Should be filled with the first 6 and last 4 digits of the PAN number of the recipient of the loan.

Type: str

property surname: str | None
Surname of the recipient of the loan.

Type: str

to_dictionary() dict[source]
property zip: str | None
Zip code of the recipient of the loan

Type: str

class onlinepayments.sdk.domain.lodging_data.LodgingData[source]

Bases: DataObject

__annotations__ = {'_LodgingData__check_in_date': typing.Optional[str]}
property check_in_date: str | None
The date the guest checks into (or plans to check in to) the facility. Format YYYYMMDD

Type: str

from_dictionary(dictionary: dict) LodgingData[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_address.MandateAddress[source]

Bases: DataObject

__annotations__ = {'_MandateAddress__city': typing.Optional[str], '_MandateAddress__country_code': typing.Optional[str], '_MandateAddress__house_number': typing.Optional[str], '_MandateAddress__street': typing.Optional[str], '_MandateAddress__zip': typing.Optional[str]}
property city: str | None
City Required for Create mandate and Create payment calls. Required for Create hostedCheckout calls where the IBAN is also provided.

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code. Required for Create mandate and Create payment calls. Required for Create hostedCheckout calls where the IBAN is also provided.

Type: str

from_dictionary(dictionary: dict) MandateAddress[source]
property house_number: str | None
House number

Type: str

property street: str | None
Streetname. Required for Create mandate and Create payment calls. Required for Create hostedCheckout calls where the IBAN is also provided.

Type: str

to_dictionary() dict[source]
property zip: str | None
Zip code. Required for Create mandate and Create payment calls. Required for Create hostedCheckout calls where the IBAN is also provided.

Type: str

class onlinepayments.sdk.domain.mandate_address_response.MandateAddressResponse[source]

Bases: DataObject

__annotations__ = {'_MandateAddressResponse__city': typing.Optional[str], '_MandateAddressResponse__country_code': typing.Optional[str], '_MandateAddressResponse__house_number': typing.Optional[str], '_MandateAddressResponse__street': typing.Optional[str], '_MandateAddressResponse__zip': typing.Optional[str]}
property city: str | None
City

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code.

Type: str

from_dictionary(dictionary: dict) MandateAddressResponse[source]
property house_number: str | None
House number

Type: str

property street: str | None
Streetname

Type: str

to_dictionary() dict[source]
property zip: str | None
Zip code

Type: str

class onlinepayments.sdk.domain.mandate_contact_details.MandateContactDetails[source]

Bases: DataObject

__annotations__ = {'_MandateContactDetails__email_address': typing.Optional[str]}
property email_address: str | None
Email address of the customer

Type: str

from_dictionary(dictionary: dict) MandateContactDetails[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_customer.MandateCustomer[source]

Bases: DataObject

__annotations__ = {'_MandateCustomer__bank_account_iban': typing.Optional[onlinepayments.sdk.domain.bank_account_iban.BankAccountIban], '_MandateCustomer__company_name': typing.Optional[str], '_MandateCustomer__contact_details': typing.Optional[onlinepayments.sdk.domain.mandate_contact_details.MandateContactDetails], '_MandateCustomer__mandate_address': typing.Optional[onlinepayments.sdk.domain.mandate_address.MandateAddress], '_MandateCustomer__personal_information': typing.Optional[onlinepayments.sdk.domain.mandate_personal_information.MandatePersonalInformation]}
property bank_account_iban: BankAccountIban | None
Object containing IBAN information

Type: onlinepayments.sdk.domain.bank_account_iban.BankAccountIban

property company_name: str | None
Name of company, as a customer

Type: str

property contact_details: MandateContactDetails | None
Object containing email address

Type: onlinepayments.sdk.domain.mandate_contact_details.MandateContactDetails

from_dictionary(dictionary: dict) MandateCustomer[source]
property mandate_address: MandateAddress | None
Object containing consumer address details. Required for Create mandate and Create payment calls. Required for Create hostedCheckout calls where the IBAN is also provided.

Type: onlinepayments.sdk.domain.mandate_address.MandateAddress

property personal_information: MandatePersonalInformation | None
Object containing personal information of the customer. Required for Create mandate and Create payment calls.

Type: onlinepayments.sdk.domain.mandate_personal_information.MandatePersonalInformation

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_customer_response.MandateCustomerResponse[source]

Bases: DataObject

__annotations__ = {'_MandateCustomerResponse__bank_account_iban': typing.Optional[onlinepayments.sdk.domain.bank_account_iban.BankAccountIban], '_MandateCustomerResponse__company_name': typing.Optional[str], '_MandateCustomerResponse__contact_details': typing.Optional[onlinepayments.sdk.domain.mandate_contact_details.MandateContactDetails], '_MandateCustomerResponse__mandate_address': typing.Optional[onlinepayments.sdk.domain.mandate_address_response.MandateAddressResponse], '_MandateCustomerResponse__personal_information': typing.Optional[onlinepayments.sdk.domain.mandate_personal_information_response.MandatePersonalInformationResponse]}
property bank_account_iban: BankAccountIban | None
Object containing IBAN information

Type: onlinepayments.sdk.domain.bank_account_iban.BankAccountIban

property company_name: str | None
Name of company, as a customer

Type: str

property contact_details: MandateContactDetails | None
Object containing email address

Type: onlinepayments.sdk.domain.mandate_contact_details.MandateContactDetails

from_dictionary(dictionary: dict) MandateCustomerResponse[source]
property mandate_address: MandateAddressResponse | None
Object containing consumer address details

Type: onlinepayments.sdk.domain.mandate_address_response.MandateAddressResponse

property personal_information: MandatePersonalInformationResponse | None
Object containing personal information of the customer

Type: onlinepayments.sdk.domain.mandate_personal_information_response.MandatePersonalInformationResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_merchant_action.MandateMerchantAction[source]

Bases: DataObject

__annotations__ = {'_MandateMerchantAction__action_type': typing.Optional[str], '_MandateMerchantAction__redirect_data': typing.Optional[onlinepayments.sdk.domain.mandate_redirect_data.MandateRedirectData]}
property action_type: str | None
Action merchants needs to take in the online mandate process. Possible values are:
  • REDIRECT - The customer needs to be redirected using the details found in redirectData

Type: str

from_dictionary(dictionary: dict) MandateMerchantAction[source]
property redirect_data: MandateRedirectData | None
Object containing all data needed to redirect the customer

Type: onlinepayments.sdk.domain.mandate_redirect_data.MandateRedirectData

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_personal_information.MandatePersonalInformation[source]

Bases: DataObject

__annotations__ = {'_MandatePersonalInformation__name': typing.Optional[onlinepayments.sdk.domain.mandate_personal_name.MandatePersonalName], '_MandatePersonalInformation__title': typing.Optional[str]}
from_dictionary(dictionary: dict) MandatePersonalInformation[source]
property name: MandatePersonalName | None
Object containing the name details of the customer. Required for Create mandate and Create payment calls.

Type: onlinepayments.sdk.domain.mandate_personal_name.MandatePersonalName

property title: str | None
Object containing the title of the customer (Mr, Miss or Mrs)

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_personal_information_response.MandatePersonalInformationResponse[source]

Bases: DataObject

__annotations__ = {'_MandatePersonalInformationResponse__name': typing.Optional[onlinepayments.sdk.domain.mandate_personal_name_response.MandatePersonalNameResponse], '_MandatePersonalInformationResponse__title': typing.Optional[str]}
from_dictionary(dictionary: dict) MandatePersonalInformationResponse[source]
property name: MandatePersonalNameResponse | None
Object containing the name details of the customer.

Type: onlinepayments.sdk.domain.mandate_personal_name_response.MandatePersonalNameResponse

property title: str | None
Object containing the title of the customer (Mr, Miss or Mrs)

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_personal_name.MandatePersonalName[source]

Bases: DataObject

__annotations__ = {'_MandatePersonalName__first_name': typing.Optional[str], '_MandatePersonalName__surname': typing.Optional[str]}
property first_name: str | None
Given name(s) or first name(s) of the customer. Required for Create mandate and Create payment calls.

Type: str

from_dictionary(dictionary: dict) MandatePersonalName[source]
property surname: str | None
Surname(s) or last name(s) of the customer. Required for Create mandate and Create payment calls.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_personal_name_response.MandatePersonalNameResponse[source]

Bases: DataObject

__annotations__ = {'_MandatePersonalNameResponse__first_name': typing.Optional[str], '_MandatePersonalNameResponse__surname': typing.Optional[str]}
property first_name: str | None
Given name(s) or first name(s) of the customer.

Type: str

from_dictionary(dictionary: dict) MandatePersonalNameResponse[source]
property surname: str | None
Surname(s) or last name(s) of the customer.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_redirect_data.MandateRedirectData[source]

Bases: DataObject

__annotations__ = {'_MandateRedirectData__redirect_url': typing.Optional[str], '_MandateRedirectData__returnmac': typing.Optional[str]}
from_dictionary(dictionary: dict) MandateRedirectData[source]
property redirect_url: str | None
The URL that the customer should be redirected to. Be sure to redirect using the GET method.

Type: str

property returnmac: str | None
A Message Authentication Code (MAC) is used to authenticate the redirection back to merchant after the payment.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mandate_response.MandateResponse[source]

Bases: DataObject

__annotations__ = {'_MandateResponse__alias': typing.Optional[str], '_MandateResponse__customer': typing.Optional[onlinepayments.sdk.domain.mandate_customer_response.MandateCustomerResponse], '_MandateResponse__customer_reference': typing.Optional[str], '_MandateResponse__mandate_pdf': typing.Optional[str], '_MandateResponse__recurrence_type': typing.Optional[str], '_MandateResponse__status': typing.Optional[str], '_MandateResponse__unique_mandate_reference': typing.Optional[str]}
property alias: str | None
An alias for the mandate. This can be used to visually represent the mandate. Do not include any unmasked sensitive data in the alias. If this field is not provided the masked IBAN of the customer is used.

Type: str

property customer: MandateCustomerResponse | None
Customer object containing customer specific outputs.

Type: onlinepayments.sdk.domain.mandate_customer_response.MandateCustomerResponse

property customer_reference: str | None
The unique identifier of a customer

Type: str

from_dictionary(dictionary: dict) MandateResponse[source]
property mandate_pdf: str | None
The mandate PDF in base64 encoded string

Type: str

property recurrence_type: str | None
Specifies whether the mandate is for one-off or recurring payments. Possible values are:
  • UNIQUE

  • RECURRING

Type: str

property status: str | None

Type: str

to_dictionary() dict[source]
property unique_mandate_reference: str | None
The unique identifier of the mandate

Type: str

class onlinepayments.sdk.domain.market_place.MarketPlace[source]

Bases: DataObject

__annotations__ = {'_MarketPlace__retailer_country': typing.Optional[str], '_MarketPlace__retailer_name': typing.Optional[str]}
from_dictionary(dictionary: dict) MarketPlace[source]
property retailer_country: str | None
ISO 3166-1 alpha-2 country code of the retailer.

Type: str

property retailer_name: str | None
This field is required if the transaction is performed by a merchant using the marketplace. This field must contain the name of the end merchant.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.merchant_action.MerchantAction[source]

Bases: DataObject

__annotations__ = {'_MerchantAction__action_type': typing.Optional[str], '_MerchantAction__mobile_three_d_secure_challenge_parameters': typing.Optional[onlinepayments.sdk.domain.mobile_three_d_secure_challenge_parameters.MobileThreeDSecureChallengeParameters], '_MerchantAction__redirect_data': typing.Optional[onlinepayments.sdk.domain.redirect_data.RedirectData], '_MerchantAction__show_form_data': typing.Optional[onlinepayments.sdk.domain.show_form_data.ShowFormData], '_MerchantAction__show_instructions_data': typing.Optional[onlinepayments.sdk.domain.show_instructions_data.ShowInstructionsData]}
property action_type: str | None
Action merchants needs to take in the online payment process. Possible values are:
  • REDIRECT - The customer needs to be redirected using the details found in redirectData

  • SHOW_FORM - The customer needs to be shown a form with the fields found in formFields. You can submit the data entered by the user in a Complete payment request.

  • SHOW_INSTRUCTIONS - The customer needs to be shown payment instruction using the details found in showData. Alternatively the instructions can be rendered by us using the instructionsRenderingData

  • SHOW_TRANSACTION_RESULTS - The customer needs to be shown the transaction results using the details found in showData. Alternatively the instructions can be rendered by us using the instructionsRenderingData

  • MOBILE_THREEDS_CHALLENGE - The customer needs to complete a challenge as part of the 3D Secure authentication inside your mobile app. The details contained in mobileThreeDSecureChallengeParameters need to be provided to the EMVco certified Mobile SDK as a challengeParameters object.

  • CALL_THIRD_PARTY - The merchant needs to call a third party using the data found in thirdPartyData

Type: str

from_dictionary(dictionary: dict) MerchantAction[source]
property mobile_three_d_secure_challenge_parameters: MobileThreeDSecureChallengeParameters | None
Mobile 3D Secure Challenge Parameters

Type: onlinepayments.sdk.domain.mobile_three_d_secure_challenge_parameters.MobileThreeDSecureChallengeParameters

property redirect_data: RedirectData | None
Object containing all data needed to redirect the customer

Type: onlinepayments.sdk.domain.redirect_data.RedirectData

property show_form_data: ShowFormData | None
Object returned for the SHOW_FORM actionType.

Type: onlinepayments.sdk.domain.show_form_data.ShowFormData

property show_instructions_data: ShowInstructionsData | None
Object returned for the SHOW_INSTRUCTIONS actionType.

Type: onlinepayments.sdk.domain.show_instructions_data.ShowInstructionsData

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mobile_payment_data.MobilePaymentData[source]

Bases: DataObject

__annotations__ = {'_MobilePaymentData__dpan': typing.Optional[str], '_MobilePaymentData__expiry_date': typing.Optional[str]}
property dpan: str | None
The obfuscated DPAN. Only the last four digits are visible.

Type: str

property expiry_date: str | None
Expiry date of the tokenized card. Format: MMYY

Type: str

from_dictionary(dictionary: dict) MobilePaymentData[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.mobile_payment_method_hosted_checkout_specific_input.MobilePaymentMethodHostedCheckoutSpecificInput[source]

Bases: DataObject

__annotations__ = {'_MobilePaymentMethodHostedCheckoutSpecificInput__authorization_mode': typing.Optional[str], '_MobilePaymentMethodHostedCheckoutSpecificInput__payment_product302_specific_input': typing.Optional[onlinepayments.sdk.domain.mobile_payment_product302_specific_input.MobilePaymentProduct302SpecificInput], '_MobilePaymentMethodHostedCheckoutSpecificInput__payment_product320_specific_input': typing.Optional[onlinepayments.sdk.domain.mobile_payment_product320_specific_input.MobilePaymentProduct320SpecificInput], '_MobilePaymentMethodHostedCheckoutSpecificInput__payment_product_id': typing.Optional[int]}
property authorization_mode: str | None
Determines the type of the authorization that will be used. Allowed values:
  • FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can’t be reversed and need to be captured for the full amount within 7 days.

  • PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.

  • SALE - The payment creation results in an authorization that is already captured at the moment of approval.

Only used with some acquirers, ignored for acquirers that do not support this. In case the acquirer does not allow this to be specified the authorizationMode is ‘unspecified’, which behaves similar to a final authorization.

Type: str

from_dictionary(dictionary: dict) MobilePaymentMethodHostedCheckoutSpecificInput[source]
property payment_product302_specific_input: MobilePaymentProduct302SpecificInput | None
Object containing information specific to Apple Pay.

Type: onlinepayments.sdk.domain.mobile_payment_product302_specific_input.MobilePaymentProduct302SpecificInput

property payment_product320_specific_input: MobilePaymentProduct320SpecificInput | None
Object containing information specific to Google Pay. Required for payments with product 320.

Type: onlinepayments.sdk.domain.mobile_payment_product320_specific_input.MobilePaymentProduct320SpecificInput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mobile_payment_method_specific_input.MobilePaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_MobilePaymentMethodSpecificInput__authorization_mode': typing.Optional[str], '_MobilePaymentMethodSpecificInput__decrypted_payment_data': typing.Optional[onlinepayments.sdk.domain.decrypted_payment_data.DecryptedPaymentData], '_MobilePaymentMethodSpecificInput__encrypted_payment_data': typing.Optional[str], '_MobilePaymentMethodSpecificInput__ephemeral_key': typing.Optional[str], '_MobilePaymentMethodSpecificInput__payment_product302_specific_input': typing.Optional[onlinepayments.sdk.domain.mobile_payment_product302_specific_input.MobilePaymentProduct302SpecificInput], '_MobilePaymentMethodSpecificInput__payment_product320_specific_input': typing.Optional[onlinepayments.sdk.domain.mobile_payment_product320_specific_input.MobilePaymentProduct320SpecificInput], '_MobilePaymentMethodSpecificInput__payment_product_id': typing.Optional[int], '_MobilePaymentMethodSpecificInput__public_key_hash': typing.Optional[str], '_MobilePaymentMethodSpecificInput__requires_approval': typing.Optional[bool]}
property authorization_mode: str | None
Determines the type of the authorization that will be used. Allowed values:
  • FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can’t be reversed and need to be captured for the full amount within 7 days.

  • PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.

  • SALE - The payment creation results in an authorization that is already captured at the moment of approval.

Only used with some acquirers, ignored for acquirers that do not support this. In case the acquirer does not allow this to be specified the authorizationMode is ‘unspecified’, which behaves similar to a final authorization.

Type: str

property decrypted_payment_data: DecryptedPaymentData | None
The payment data if you do the decryption of the encrypted payment data yourself.

Type: onlinepayments.sdk.domain.decrypted_payment_data.DecryptedPaymentData

property encrypted_payment_data: str | None
The payment data if we will do the decryption of the encrypted payment data. Typically you’d use encryptedCustomerInput in the root of the create payment request to provide the encrypted payment data instead.
  • For Apple Pay, the encrypted payment data can be found in property data of the PKPayment.token.paymentData property.

Type: str

property ephemeral_key: str | None
Ephemeral Key A unique generated key used by Apple to encrypt data.

Type: str

from_dictionary(dictionary: dict) MobilePaymentMethodSpecificInput[source]
property payment_product302_specific_input: MobilePaymentProduct302SpecificInput | None
Object containing information specific to Apple Pay.

Type: onlinepayments.sdk.domain.mobile_payment_product302_specific_input.MobilePaymentProduct302SpecificInput

property payment_product320_specific_input: MobilePaymentProduct320SpecificInput | None
Object containing information specific to Google Pay. Required for payments with product 320.

Type: onlinepayments.sdk.domain.mobile_payment_product320_specific_input.MobilePaymentProduct320SpecificInput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property public_key_hash: str | None
Public Key Hash A unique identifier to retrieve key used by Apple to encrypt information.

Type: str

property requires_approval: bool | None
  • true = the payment requires approval before the funds will be captured using the Approve payment or Capture payment API

  • false = the payment does not require approval, and the funds will be captured automatically

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mobile_payment_method_specific_output.MobilePaymentMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_MobilePaymentMethodSpecificOutput__authorisation_code': typing.Optional[str], '_MobilePaymentMethodSpecificOutput__fraud_results': typing.Optional[onlinepayments.sdk.domain.card_fraud_results.CardFraudResults], '_MobilePaymentMethodSpecificOutput__network': typing.Optional[str], '_MobilePaymentMethodSpecificOutput__payment_data': typing.Optional[onlinepayments.sdk.domain.mobile_payment_data.MobilePaymentData], '_MobilePaymentMethodSpecificOutput__payment_product_id': typing.Optional[int], '_MobilePaymentMethodSpecificOutput__three_d_secure_results': typing.Optional[onlinepayments.sdk.domain.three_d_secure_results.ThreeDSecureResults]}
property authorisation_code: str | None
Card Authorization code as returned by the acquirer

Type: str

property fraud_results: CardFraudResults | None
Fraud results contained in the CardFraudResults object

Type: onlinepayments.sdk.domain.card_fraud_results.CardFraudResults

from_dictionary(dictionary: dict) MobilePaymentMethodSpecificOutput[source]
property network: str | None
The card network that was used for a mobile payment method operation

Type: str

property payment_data: MobilePaymentData | None
Object containing payment details

Type: onlinepayments.sdk.domain.mobile_payment_data.MobilePaymentData

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property three_d_secure_results: ThreeDSecureResults | None
3D Secure results object

Type: onlinepayments.sdk.domain.three_d_secure_results.ThreeDSecureResults

to_dictionary() dict[source]
class onlinepayments.sdk.domain.mobile_payment_product302_specific_input.MobilePaymentProduct302SpecificInput[source]

Bases: DataObject

__annotations__ = {'_MobilePaymentProduct302SpecificInput__apple_pay_recurring_payment_request': typing.Optional[onlinepayments.sdk.domain.apple_pay_recurring_payment_request.ApplePayRecurringPaymentRequest], '_MobilePaymentProduct302SpecificInput__is_recurring': typing.Optional[bool], '_MobilePaymentProduct302SpecificInput__recurring': typing.Optional[onlinepayments.sdk.domain.product302_recurring.Product302Recurring], '_MobilePaymentProduct302SpecificInput__tokenize': typing.Optional[bool]}
property apple_pay_recurring_payment_request: ApplePayRecurringPaymentRequest | None
Object containing information specific to Apple Pay recurring request.

Type: onlinepayments.sdk.domain.apple_pay_recurring_payment_request.ApplePayRecurringPaymentRequest

from_dictionary(dictionary: dict) MobilePaymentProduct302SpecificInput[source]
property is_recurring: bool | None
  • true - Indicates that the transaction is part of a scheduled recurring sequence. In addition, recurringPaymentSequenceIndicator indicates if the transaction is the first or subsequent in a recurring sequence.

  • false - Indicates that the transaction is not part of a scheduled recurring sequence. The default value for this property is false. For HostedCheckout use the hostedCheckoutSpecificInput.isRecurring property instead.

Type: bool

property recurring: Product302Recurring | None
Object containing information specific to Apple Pay and recurring.

Type: onlinepayments.sdk.domain.product302_recurring.Product302Recurring

to_dictionary() dict[source]
property tokenize: bool | None
Indicates if this transaction should be tokenized
  • true - Tokenize the transaction. Note that a payment on the payment platform that results in a status REDIRECTED cannot be tokenized in this way.

  • false - Do not tokenize the transaction, unless it would be tokenized by other means such as auto-tokenization of recurring payments.

Type: bool

class onlinepayments.sdk.domain.mobile_payment_product320_specific_input.MobilePaymentProduct320SpecificInput[source]

Bases: DataObject

__annotations__ = {'_MobilePaymentProduct320SpecificInput__is_recurring': typing.Optional[bool], '_MobilePaymentProduct320SpecificInput__recurring': typing.Optional[onlinepayments.sdk.domain.product320_recurring.Product320Recurring], '_MobilePaymentProduct320SpecificInput__three_d_secure': typing.Optional[onlinepayments.sdk.domain.g_pay_three_d_secure.GPayThreeDSecure], '_MobilePaymentProduct320SpecificInput__tokenize': typing.Optional[bool]}
from_dictionary(dictionary: dict) MobilePaymentProduct320SpecificInput[source]
property is_recurring: bool | None
  • true - Indicates that the transaction is part of a scheduled recurring sequence. In addition, recurringPaymentSequenceIndicator indicates if the transaction is the first or subsequent in a recurring sequence.

  • false - Indicates that the transaction is not part of a scheduled recurring sequence. The default value for this property is false. For HostedCheckout use the hostedCheckoutSpecificInput.isRecurring property instead.

Type: bool

property recurring: Product320Recurring | None
Object containing information specific to Google Pay and recurring.

Type: onlinepayments.sdk.domain.product320_recurring.Product320Recurring

property three_d_secure: GPayThreeDSecure | None
Object containing specific data regarding 3-D Secure

Type: onlinepayments.sdk.domain.g_pay_three_d_secure.GPayThreeDSecure

to_dictionary() dict[source]
property tokenize: bool | None
Indicates if this transaction should be tokenized
  • true - Tokenize the transaction. Note that a payment on the payment platform that results in a status REDIRECTED cannot be tokenized in this way.

  • false - Do not tokenize the transaction, unless it would be tokenized by other means such as auto-tokenization of recurring payments.

Type: bool

class onlinepayments.sdk.domain.mobile_three_d_secure_challenge_parameters.MobileThreeDSecureChallengeParameters[source]

Bases: DataObject

__annotations__ = {'_MobileThreeDSecureChallengeParameters__acs_reference_number': typing.Optional[str], '_MobileThreeDSecureChallengeParameters__acs_signed_content': typing.Optional[str], '_MobileThreeDSecureChallengeParameters__acs_transaction_id': typing.Optional[str], '_MobileThreeDSecureChallengeParameters__three_d_server_transaction_id': typing.Optional[str]}
property acs_reference_number: str | None
The unique identifier assigned by the EMVCo Secretariat upon testing and approval.

Type: str

property acs_signed_content: str | None
Contains the JWS object created by the ACS for the challenge (ARes).

Type: str

property acs_transaction_id: str | None
The ACS Transaction ID for a prior 3-D Secure authenticated transaction (for example, the first recurring transaction that was authenticated with the customer).

Type: str

from_dictionary(dictionary: dict) MobileThreeDSecureChallengeParameters[source]
property three_d_server_transaction_id: str | None
The 3-D Secure version 2 transaction ID that is used for the 3D Authentication

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.multiple_payment_information.MultiplePaymentInformation[source]

Bases: DataObject

__annotations__ = {'_MultiplePaymentInformation__payment_pattern': typing.Optional[str], '_MultiplePaymentInformation__total_number_of_payments': typing.Optional[int]}
from_dictionary(dictionary: dict) MultiplePaymentInformation[source]
property payment_pattern: str | None
Typology of multiple payment. Allowed values:
  • PartialShipment

Type: str

to_dictionary() dict[source]
property total_number_of_payments: int | None
Total number of payments. If a payment is implied by this call, it implicitly has ordinal number 1.

Type: int

class onlinepayments.sdk.domain.network_token_data.NetworkTokenData[source]

Bases: DataObject

__annotations__ = {'_NetworkTokenData__cardholder_name': typing.Optional[str], '_NetworkTokenData__cryptogram': typing.Optional[str], '_NetworkTokenData__eci': typing.Optional[int], '_NetworkTokenData__network_token': typing.Optional[str], '_NetworkTokenData__scheme_token_requestor_id': typing.Optional[str], '_NetworkTokenData__token_expiry_date': typing.Optional[str]}
property cardholder_name: str | None
The card holder’s name on the card associated with the Network Token.

Type: str

property cryptogram: str | None
The Token Cryptogram is a dynamic one-time use value that is used to verify the authenticity of the transaction and the integrity of the data used in the generation of the Token Cryptogram. Visa calls this the Token Authentication Verification Value (TAVV) cryptogram.

Type: str

property eci: int | None
The Electronic Commerce Indicator linked to the Token Cryptogram that is provided by the token service provider during the generation of the Token Cryptogram.

Type: int

from_dictionary(dictionary: dict) NetworkTokenData[source]
property network_token: str | None
Payment Token associated with the Card used for the purchase. Note: This is called Payment Token in the EMVCo documentation.

Type: str

property scheme_token_requestor_id: str | None
Token Requestor Identifier used with the token service provider during the creation of the Network Token. Depending on the acquirer, this data might be required in the authorization request. We advise you to provide it for all Network Token initiated transactions.

Type: str

to_dictionary() dict[source]
property token_expiry_date: str | None
The expiry date of the network token. Format: MMYY

Type: str

class onlinepayments.sdk.domain.network_token_essentials.NetworkTokenEssentials[source]

Bases: DataObject

__annotations__ = {'_NetworkTokenEssentials__bin': typing.Optional[str], '_NetworkTokenEssentials__country_code': typing.Optional[str], '_NetworkTokenEssentials__network_token': typing.Optional[str], '_NetworkTokenEssentials__network_token_state': typing.Optional[str], '_NetworkTokenEssentials__network_token_used': typing.Optional[bool], '_NetworkTokenEssentials__token_expiry_date': typing.Optional[str]}
property bin: str | None
The first digits of the network token number from left to right with a minimum of 6 digits.

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

from_dictionary(dictionary: dict) NetworkTokenEssentials[source]
property network_token: str | None
The masked Payment Token associated with the Card used for the purchase. Note: This is called Payment Token in the EMVCo documentation.

Type: str

property network_token_state: str | None
Describes the state of the linked network token:
  • requested - A Network Token has been requested from the scheme.

  • denied - A Network Token request has been denied from the scheme.

  • active - The linked Network Token is active and can be used for the subsequent payment in the payment series.

  • suspended - The linked Network Token is suspended and can not be used for the subsequent payment in the payment series. Instead PAN details would be used for the subsequent payment in the payment series.

  • deleted - The linked Network Token is deleted and can not be used for the subsequent payment in the payment series. Instead PAN details would be used for the subsequent payment in the payment series.

  • failed - An attempt was made to request a Network Token, but it was not successful.

Type: str

property network_token_used: bool | None
Whether or not a network token was used in the transaction

Type: bool

to_dictionary() dict[source]
property token_expiry_date: str | None
The expiry date of the network token. Format: MMYY

Type: str

class onlinepayments.sdk.domain.network_token_linked.NetworkTokenLinked[source]

Bases: DataObject

__annotations__ = {'_NetworkTokenLinked__expiry_date': typing.Optional[str], '_NetworkTokenLinked__masked_token': typing.Optional[str], '_NetworkTokenLinked__token_state': typing.Optional[str]}
property expiry_date: str | None
The expiry date of the network token. Format: MMYY

Type: str

from_dictionary(dictionary: dict) NetworkTokenLinked[source]
property masked_token: str | None
The masked Payment Token associated with the Card used for the purchase. Note: This is called Payment Token in the EMVCo documentation.

Type: str

to_dictionary() dict[source]
property token_state: str | None
Describes the state of the linked network token:
  • requested - A Network Token has been requested from the scheme.

  • denied - A Network Token request has been denied from the scheme.

  • active - The linked Network Token is active and can be used for the subsequent payment in the payment series.

  • suspended - The linked Network Token is suspended and can not be used for the subsequent payment in the payment series. Instead PAN details would be used for the subsequent payment in the payment series.

  • deleted - The linked Network Token is deleted and can not be used for the subsequent payment in the payment series. Instead PAN details would be used for the subsequent payment in the payment series.

  • failed - An attempt was made to request a Network Token, but it was not successful.

Type: str

class onlinepayments.sdk.domain.omnichannel_payout_specific_input.OmnichannelPayoutSpecificInput[source]

Bases: DataObject

__annotations__ = {'_OmnichannelPayoutSpecificInput__operator_id': typing.Optional[str], '_OmnichannelPayoutSpecificInput__payment_id': typing.Optional[str]}
from_dictionary(dictionary: dict) OmnichannelPayoutSpecificInput[source]
property operator_id: str | None
Merchants may optionally include a user identifier to indicate which person within their organization initiated this request, enabling detailed audit trails and transaction accountability. If not provided, the field defaults to the merchant ID.

Type: str

property payment_id: str | None
The Payment Id of the transaction (either in-store or online), from which you request to make a refund.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.omnichannel_refund_specific_input.OmnichannelRefundSpecificInput[source]

Bases: DataObject

__annotations__ = {'_OmnichannelRefundSpecificInput__operator_id': typing.Optional[str]}
from_dictionary(dictionary: dict) OmnichannelRefundSpecificInput[source]
property operator_id: str | None
Merchants may optionally include a user identifier to indicate which person within their organization initiated this request, enabling detailed audit trails and transaction accountability. If not provided, the field defaults to the merchant ID.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.omnichannel_subsequent_specific_input.OmnichannelSubsequentSpecificInput[source]

Bases: DataObject

__annotations__ = {'_OmnichannelSubsequentSpecificInput__operator_id': typing.Optional[str]}
from_dictionary(dictionary: dict) OmnichannelSubsequentSpecificInput[source]
property operator_id: str | None
Merchants may optionally include a user identifier to indicate which person within their organization initiated this request, enabling detailed audit trails and transaction accountability. If not provided, the field defaults to the merchant ID.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.operation_output.OperationOutput[source]

Bases: DataObject

__annotations__ = {'_OperationOutput__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_OperationOutput__id': typing.Optional[str], '_OperationOutput__operation_references': typing.Optional[onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences], '_OperationOutput__payment_method': typing.Optional[str], '_OperationOutput__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences], '_OperationOutput__status': typing.Optional[str], '_OperationOutput__status_output': typing.Optional[onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

from_dictionary(dictionary: dict) OperationOutput[source]
property id: str | None
This is our unique payment transaction identifier.

Type: str

property operation_references: OperationPaymentReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences

property payment_method: str | None
Payment method identifier used by the our payment engine.

Type: str

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

property status: str | None
Current high-level status of the payment in a human-readable form.

Type: str

property status_output: PaymentStatusOutput | None
This object has the numeric representation of the current payment status, the timestamp of the last status change, and the performable action on the current payment resource. In case of failed payments and negative scenarios, detailed error information is listed.

Type: onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences[source]

Bases: DataObject

__annotations__ = {'_OperationPaymentReferences__merchant_reference': typing.Optional[str], '_OperationPaymentReferences__operation_group_reference': typing.Optional[str]}
from_dictionary(dictionary: dict) OperationPaymentReferences[source]
property merchant_reference: str | None
Your unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files. It is highly recommended to provide a single MerchantReference per unique order on your side

Type: str

property operation_group_reference: str | None
An identifier for a group of transactions. This reference helps to link multiple related transactions together, facilitating easier reconciliation and tracking.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.order.Order[source]

Bases: DataObject

__annotations__ = {'_Order__additional_input': typing.Optional[onlinepayments.sdk.domain.additional_order_input.AdditionalOrderInput], '_Order__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_Order__customer': typing.Optional[onlinepayments.sdk.domain.customer.Customer], '_Order__discount': typing.Optional[onlinepayments.sdk.domain.discount.Discount], '_Order__references': typing.Optional[onlinepayments.sdk.domain.order_references.OrderReferences], '_Order__shipping': typing.Optional[onlinepayments.sdk.domain.shipping.Shipping], '_Order__shopping_cart': typing.Optional[onlinepayments.sdk.domain.shopping_cart.ShoppingCart], '_Order__surcharge_specific_input': typing.Optional[onlinepayments.sdk.domain.surcharge_specific_input.SurchargeSpecificInput], '_Order__total_tax_amount': typing.Optional[int]}
property additional_input: AdditionalOrderInput | None
This object contains additional input on the order.

Type: onlinepayments.sdk.domain.additional_order_input.AdditionalOrderInput

property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property customer: Customer | None
Object containing the details of the customer

Type: onlinepayments.sdk.domain.customer.Customer

property discount: Discount | None
Object to apply a discount to the total basket by adding a discount line.

Type: onlinepayments.sdk.domain.discount.Discount

from_dictionary(dictionary: dict) Order[source]
property references: OrderReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.order_references.OrderReferences

property shipping: Shipping | None
Object containing information regarding shipping / delivery

Type: onlinepayments.sdk.domain.shipping.Shipping

property shopping_cart: ShoppingCart | None
Shopping cart data, including items and specific amounts.

Type: onlinepayments.sdk.domain.shopping_cart.ShoppingCart

property surcharge_specific_input: SurchargeSpecificInput | None
Object containing specific input required to apply surcharging to an order.

Type: onlinepayments.sdk.domain.surcharge_specific_input.SurchargeSpecificInput

to_dictionary() dict[source]
property total_tax_amount: int | None
tax amount, in minor currency units of the order. Omit if not applicable or not known. This amount is assumed to be included in the order.AmountOfMoney for the payment. There is no validation on this field, outside the fact the amount should be lower than the total payment amount.

Type: int

class onlinepayments.sdk.domain.order_line_details.OrderLineDetails[source]

Bases: DataObject

__annotations__ = {'_OrderLineDetails__discount_amount': typing.Optional[int], '_OrderLineDetails__product_brand': typing.Optional[str], '_OrderLineDetails__product_code': typing.Optional[str], '_OrderLineDetails__product_name': typing.Optional[str], '_OrderLineDetails__product_price': typing.Optional[int], '_OrderLineDetails__product_type': typing.Optional[str], '_OrderLineDetails__quantity': typing.Optional[int], '_OrderLineDetails__tax_amount': typing.Optional[int], '_OrderLineDetails__unit': typing.Optional[str]}
property discount_amount: int | None
Discount on the line item, with the last two digits implied as decimal places

Type: int

from_dictionary(dictionary: dict) OrderLineDetails[source]
property product_brand: str | None
The brand of the product.

Type: str

property product_code: str | None
Product or UPC Code

Type: str

property product_name: str | None
The name of the product.

Type: str

property product_price: int | None
The price of one unit of the product, the value should be zero or greater

Type: int

property product_type: str | None
Code used to classify items that are purchased

Type: str

property quantity: int | None
Quantity of the units being purchased, should be greater than zero Note: Must not be all spaces or all zeros

Type: int

property tax_amount: int | None
Tax on the line item, with the last two digits implied as decimal places

Type: int

to_dictionary() dict[source]
property unit: str | None
Indicates the line item unit of measure; for example: each, kit, pair, gallon, month, etc.

Type: str

class onlinepayments.sdk.domain.order_references.OrderReferences[source]

Bases: DataObject

__annotations__ = {'_OrderReferences__descriptor': typing.Optional[str], '_OrderReferences__merchant_parameters': typing.Optional[str], '_OrderReferences__merchant_reference': typing.Optional[str], '_OrderReferences__operation_group_reference': typing.Optional[str]}
property descriptor: str | None
Descriptive text that is used towards to customer, either during an online checkout at a third party and/or on the statement of the customer. For card transactions this is usually referred to as a Soft Descriptor. The maximum allowed length varies per card acquirer:
  • AIB - 22 characters

  • American Express - 25 characters

  • Atos Origin BNP - 15 characters

  • Barclays - 25 characters

  • Catella - 22 characters

  • CBA - 20 characters

  • Elavon - 25 characters

  • First Data - 25 characters

  • INICIS (INIPAY) - 22-30 characters

  • JCB - 25 characters

  • Merchant Solutions - 22-25 characters

  • Payvision (EU & HK) - 25 characters

  • SEB Euroline - 22 characters

  • Sub1 Argentina - 15 characters

  • Wells Fargo - 25 characters Note that we advise you to use 22 characters as the max length as beyond this our experience is that issuers will start to truncate. We currently also only allow per API call overrides for AIB and Barclays For alternative payment products the maximum allowed length varies per payment product:

  • 402 e-Przelewy - 30 characters

  • 404 INICIS - 80 characters

  • 802 Nordea ePayment Finland - 234 characters

  • 809 iDeal - 32 characters

  • 836 SOFORT - 42 characters

  • 840 PayPal - 127 characters

  • 841 WebMoney - 175 characters

  • 849 Yandex - 64 characters

  • 861 Alipay - 256 characters

  • 863 WeChat Pay - 32 characters

  • 880 BOKU - 20 characters

  • 8580 Qiwi - 255 characters

  • 1504 Konbini - 80 characters All other payment products do not support a descriptor.

Type: str

from_dictionary(dictionary: dict) OrderReferences[source]
property merchant_parameters: str | None
It allows you to store additional parameters for the transaction in the format you prefer (e.g.-> key-value query string, JSON, etc.) These parameters are then echoed back to you in API GET calls and Webhook notifications. This field must not contain any personal data.

Type: str

property merchant_reference: str | None
Your unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files. It is highly recommended to provide a single MerchantReference per unique order on your side

Type: str

property operation_group_reference: str | None
An identifier for a group of transactions. This reference helps to link multiple related transactions together, facilitating easier reconciliation and tracking.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.order_status_output.OrderStatusOutput[source]

Bases: DataObject

__annotations__ = {'_OrderStatusOutput__errors': typing.Optional[typing.List[onlinepayments.sdk.domain.api_error.APIError]], '_OrderStatusOutput__is_cancellable': typing.Optional[bool], '_OrderStatusOutput__status_category': typing.Optional[str], '_OrderStatusOutput__status_code': typing.Optional[int], '_OrderStatusOutput__status_code_change_date_time': typing.Optional[str]}
property errors: List[APIError] | None

Type: list[onlinepayments.sdk.domain.api_error.APIError]

from_dictionary(dictionary: dict) OrderStatusOutput[source]
property is_cancellable: bool | None
Flag indicating if the payment can be cancelled
  • true

  • false

Type: bool

property status_category: str | None
Highlevel status of the payment, payout or refund.

Type: str

property status_code: int | None
Numeric status code of the legacy API. The value can also be found in the BackOffice and in report files.

Type: int

property status_code_change_date_time: str | None
Timestamp of the latest status change

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.order_type_information.OrderTypeInformation[source]

Bases: DataObject

__annotations__ = {'_OrderTypeInformation__purchase_type': typing.Optional[str], '_OrderTypeInformation__transaction_type': typing.Optional[str]}
from_dictionary(dictionary: dict) OrderTypeInformation[source]
property purchase_type: str | None
Possible values are:
  • physical (tangible goods shipped to the customers)

  • digital (digital services like ebooks, streaming…)

Type: str

to_dictionary() dict[source]
property transaction_type: str | None
Identifies the type of transaction being authenticated. Possible values are:
  • purchase = The purpose of the transaction is to purchase goods or services (Default)

  • check-acceptance = The purpose of the transaction is to accept a ‘check’/’cheque’

  • account-funding = The purpose of the transaction is to fund an account

  • quasi-cash = The purpose of the transaction is to buy a quasi cash type product that is representative of actual cash such as money orders, traveler’s checks, foreign currency, lottery tickets or casino gaming chips

  • prepaid-activation-or-load = The purpose of the transaction is to activate or load a prepaid card

Type: str

class onlinepayments.sdk.domain.other_details.OtherDetails[source]

Bases: DataObject

__annotations__ = {'_OtherDetails__meta_data': typing.Optional[str], '_OtherDetails__travel_data': typing.Optional[str]}
from_dictionary(dictionary: dict) OtherDetails[source]
property meta_data: str | None
Information used by the following PaymentProducts [5300] to provide details on the item such as the color, size, etc. The field is in JSON format, with keys and values expected by the payment method at transaction creation. Please refer to the payment mean documentation.

Type: str

to_dictionary() dict[source]
property travel_data: str | None
Information used by the following PaymentProducts [5110,5111,5112,5125,3104,3107,3108,3109].

Type: str

class onlinepayments.sdk.domain.payment_account_on_file.PaymentAccountOnFile[source]

Bases: DataObject

__annotations__ = {'_PaymentAccountOnFile__create_date': typing.Optional[str], '_PaymentAccountOnFile__number_of_card_on_file_creation_attempts_last24_hours': typing.Optional[int]}
property create_date: str | None
The date (YYYYMMDD) when the payment account on file was first created.

In case a token is used for the transaction we will use the creation date of the token in our system in case you leave this property empty.

Type: str

from_dictionary(dictionary: dict) PaymentAccountOnFile[source]
property number_of_card_on_file_creation_attempts_last24_hours: int | None
Number of attempts made to add new card to the customer account in the last 24 hours

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_context.PaymentContext[source]

Bases: DataObject

__annotations__ = {'_PaymentContext__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_PaymentContext__country_code': typing.Optional[str], '_PaymentContext__is_recurring': typing.Optional[bool]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property country_code: str | None
The country the payment takes place in

Type: str

from_dictionary(dictionary: dict) PaymentContext[source]
property is_recurring: bool | None
True if the payment is recurring

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_creation_output.PaymentCreationOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentCreationOutput__external_reference': typing.Optional[str], '_PaymentCreationOutput__is_new_token': typing.Optional[bool], '_PaymentCreationOutput__token': typing.Optional[str], '_PaymentCreationOutput__tokenization_succeeded': typing.Optional[bool]}
property external_reference: str | None
The external reference identifier for this transaction. Data in this property will also be returned in our report files, allowing you to reconcile them

Type: str

from_dictionary(dictionary: dict) PaymentCreationOutput[source]
property is_new_token: bool | None
Indicates if a new token was created
  • true - A new token was created

  • false - A token with the same card number already exists and is returned. Please note that the existing token has not been updated. When you want to update other data then the card number, you need to update data stored in the token explicitly, as data is never updated during the creation of a token.

Type: bool

to_dictionary() dict[source]
property token: str | None
ID of the token. This property is populated when the payment was done with a token or when the payment was tokenized.

Type: str

property tokenization_succeeded: bool | None
Indicates if tokenization was successful or not. If this value is false, then the token and the isNewToken property will not be set.

Type: bool

class onlinepayments.sdk.domain.payment_details_response.PaymentDetailsResponse[source]

Bases: DataObject

__annotations__ = {'_PaymentDetailsResponse__hosted_checkout_specific_output': typing.Optional[onlinepayments.sdk.domain.hosted_checkout_specific_output.HostedCheckoutSpecificOutput], '_PaymentDetailsResponse__id': typing.Optional[str], '_PaymentDetailsResponse__operations': typing.Optional[typing.List[onlinepayments.sdk.domain.operation_output.OperationOutput]], '_PaymentDetailsResponse__payment_output': typing.Optional[onlinepayments.sdk.domain.payment_output.PaymentOutput], '_PaymentDetailsResponse__status': typing.Optional[str], '_PaymentDetailsResponse__status_output': typing.Optional[onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput]}
from_dictionary(dictionary: dict) PaymentDetailsResponse[source]
property hosted_checkout_specific_output: HostedCheckoutSpecificOutput | None
Hosted Checkout specific information. Populated if the payment was created on the platform through a Hosted Checkout.

Type: onlinepayments.sdk.domain.hosted_checkout_specific_output.HostedCheckoutSpecificOutput

property id: str | None
This is our unique payment transaction identifier.

Type: str

property operations: List[OperationOutput] | None
Object that contains the complete list of operations executed on the payment.

Type: list[onlinepayments.sdk.domain.operation_output.OperationOutput]

property payment_output: PaymentOutput | None
Object containing payment details

Type: onlinepayments.sdk.domain.payment_output.PaymentOutput

property status: str | None
Current high-level status of the payment in a human-readable form.

Type: str

property status_output: PaymentStatusOutput | None
This object has the numeric representation of the current payment status, the timestamp of the last status change, and the performable action on the current payment resource. In case of failed payments and negative scenarios, detailed error information is listed.

Type: onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_error_response.PaymentErrorResponse[source]

Bases: DataObject

__annotations__ = {'_PaymentErrorResponse__error_id': typing.Optional[str], '_PaymentErrorResponse__errors': typing.Optional[typing.List[onlinepayments.sdk.domain.api_error.APIError]], '_PaymentErrorResponse__payment_result': typing.Optional[onlinepayments.sdk.domain.create_payment_response.CreatePaymentResponse]}
property error_id: str | None
Unique reference, for debugging purposes, of this error response

Type: str

property errors: List[APIError] | None

Type: list[onlinepayments.sdk.domain.api_error.APIError]

from_dictionary(dictionary: dict) PaymentErrorResponse[source]
property payment_result: CreatePaymentResponse | None
This object contains details about the created payment if one has been generated.

Type: onlinepayments.sdk.domain.create_payment_response.CreatePaymentResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_output.PaymentOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentOutput__acquired_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_PaymentOutput__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_PaymentOutput__amount_paid': typing.Optional[int], '_PaymentOutput__card_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.card_payment_method_specific_output.CardPaymentMethodSpecificOutput], '_PaymentOutput__customer': typing.Optional[onlinepayments.sdk.domain.customer_output.CustomerOutput], '_PaymentOutput__discount': typing.Optional[onlinepayments.sdk.domain.discount.Discount], '_PaymentOutput__merchant_parameters': typing.Optional[str], '_PaymentOutput__mobile_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.mobile_payment_method_specific_output.MobilePaymentMethodSpecificOutput], '_PaymentOutput__payment_method': typing.Optional[str], '_PaymentOutput__redirect_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.redirect_payment_method_specific_output.RedirectPaymentMethodSpecificOutput], '_PaymentOutput__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences], '_PaymentOutput__sepa_direct_debit_payment_method_specific_output': typing.Optional[onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_output.SepaDirectDebitPaymentMethodSpecificOutput], '_PaymentOutput__surcharge_specific_output': typing.Optional[onlinepayments.sdk.domain.surcharge_specific_output.SurchargeSpecificOutput]}
property acquired_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property amount_paid: int | None
Amount that has been paid. This is deprecated. Use acquiredAmount instead.

Type: int

Deprecated; Amount that has been paid. This is deprecated. Use acquiredAmount instead.

property card_payment_method_specific_output: CardPaymentMethodSpecificOutput | None
Object containing the card payment method details

Type: onlinepayments.sdk.domain.card_payment_method_specific_output.CardPaymentMethodSpecificOutput

property customer: CustomerOutput | None
Object containing the details of the customer

Type: onlinepayments.sdk.domain.customer_output.CustomerOutput

property discount: Discount | None
Object to apply a discount to the total basket by adding a discount line.

Type: onlinepayments.sdk.domain.discount.Discount

from_dictionary(dictionary: dict) PaymentOutput[source]
property merchant_parameters: str | None
It allows you to store additional parameters for the transaction in the format you prefer (e.g.-> key-value query string, JSON, etc.) These parameters are then echoed back to you in API GET calls and Webhook notifications. This field must not contain any personal data.

Type: str

property mobile_payment_method_specific_output: MobilePaymentMethodSpecificOutput | None
Object containing the mobile payment method details

Type: onlinepayments.sdk.domain.mobile_payment_method_specific_output.MobilePaymentMethodSpecificOutput

property payment_method: str | None
Payment method identifier used by the our payment engine.

Type: str

property redirect_payment_method_specific_output: RedirectPaymentMethodSpecificOutput | None
Object containing the redirect payment product details

Type: onlinepayments.sdk.domain.redirect_payment_method_specific_output.RedirectPaymentMethodSpecificOutput

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

property sepa_direct_debit_payment_method_specific_output: SepaDirectDebitPaymentMethodSpecificOutput | None
Object containing the SEPA direct debit details

Type: onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_output.SepaDirectDebitPaymentMethodSpecificOutput

property surcharge_specific_output: SurchargeSpecificOutput | None
Object containing specific surcharging attributes applied to an order.

Type: onlinepayments.sdk.domain.surcharge_specific_output.SurchargeSpecificOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product.PaymentProduct[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct__accounts_on_file': typing.Optional[typing.List[onlinepayments.sdk.domain.account_on_file.AccountOnFile]], '_PaymentProduct__allows_authentication': typing.Optional[bool], '_PaymentProduct__allows_recurring': typing.Optional[bool], '_PaymentProduct__allows_tokenization': typing.Optional[bool], '_PaymentProduct__display_hints': typing.Optional[onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints], '_PaymentProduct__display_hints_list': typing.Optional[typing.List[onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints]], '_PaymentProduct__fields': typing.Optional[typing.List[onlinepayments.sdk.domain.payment_product_field.PaymentProductField]], '_PaymentProduct__id': typing.Optional[int], '_PaymentProduct__payment_method': typing.Optional[str], '_PaymentProduct__payment_product302_specific_data': typing.Optional[onlinepayments.sdk.domain.payment_product302_specific_data.PaymentProduct302SpecificData], '_PaymentProduct__payment_product320_specific_data': typing.Optional[onlinepayments.sdk.domain.payment_product320_specific_data.PaymentProduct320SpecificData], '_PaymentProduct__payment_product_group': typing.Optional[str], '_PaymentProduct__uses_redirection_to3rd_party': typing.Optional[bool]}
property accounts_on_file: List[AccountOnFile] | None
List of tokens for that payment product

Type: list[onlinepayments.sdk.domain.account_on_file.AccountOnFile]

property allows_authentication: bool | None
True when 3DS authentication is supported or required for the product

Type: bool

property allows_recurring: bool | None
Indicates if the product supports recurring payments
  • true - This payment product supports recurring payments

  • false - This payment product does not support recurring transactions and can only be used for one-off payments

Type: bool

property allows_tokenization: bool | None
Indicates if the payment details can be tokenized for future re-use
  • true - Payment details from payments done with this payment product can be tokenized for future re-use

  • false - Payment details from payments done with this payment product can not be tokenized

Type: bool

property display_hints: PaymentProductDisplayHints | None
Object containing display hints like the order of the product when shown in a list, the name of the product and the logo

Type: onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints

property display_hints_list: List[PaymentProductDisplayHints] | None

Type: list[onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints]

property fields: List[PaymentProductField] | None
Object containing all the fields and their details that are associated with this payment product. If you are not interested in the data on the fields you should have us filter them our (using filter=fields in the query-string)

Type: list[onlinepayments.sdk.domain.payment_product_field.PaymentProductField]

from_dictionary(dictionary: dict) PaymentProduct[source]
property id: int | None
The ID of the payment product in our system

Type: int

property payment_method: str | None
Payment method identifier used by the our payment engine.

Type: str

property payment_product302_specific_data: PaymentProduct302SpecificData | None

Type: onlinepayments.sdk.domain.payment_product302_specific_data.PaymentProduct302SpecificData

property payment_product320_specific_data: PaymentProduct320SpecificData | None

Type: onlinepayments.sdk.domain.payment_product320_specific_data.PaymentProduct320SpecificData

property payment_product_group: str | None
The payment product group that has this payment product, if there is any. Not populated otherwise. Currently only one payment product group is supported:
  • cards

Type: str

to_dictionary() dict[source]
property uses_redirection_to3rd_party: bool | None
Indicates whether the payment product requires redirection to a third party to complete the payment. You can use this to filter out products that require a redirect if you do not want to support that.
  • true - Redirection is required

  • false - No redirection is required

Type: bool

class onlinepayments.sdk.domain.payment_product130_specific_input.PaymentProduct130SpecificInput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct130SpecificInput__three_d_secure': typing.Optional[onlinepayments.sdk.domain.payment_product130_specific_three_d_secure.PaymentProduct130SpecificThreeDSecure]}
from_dictionary(dictionary: dict) PaymentProduct130SpecificInput[source]
property three_d_secure: PaymentProduct130SpecificThreeDSecure | None
Object containing specific data regarding 3-D Secure

Type: onlinepayments.sdk.domain.payment_product130_specific_three_d_secure.PaymentProduct130SpecificThreeDSecure

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product130_specific_three_d_secure.PaymentProduct130SpecificThreeDSecure[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct130SpecificThreeDSecure__acquirer_exemption': typing.Optional[bool], '_PaymentProduct130SpecificThreeDSecure__merchant_score': typing.Optional[str], '_PaymentProduct130SpecificThreeDSecure__number_of_items': typing.Optional[int], '_PaymentProduct130SpecificThreeDSecure__usecase': typing.Optional[str]}
property acquirer_exemption: bool | None
Indicates the Acquirer TRA exemption

Type: bool

from_dictionary(dictionary: dict) PaymentProduct130SpecificThreeDSecure[source]
property merchant_score: str | None
Score calculated by the 3DS Requestor and provided to CB Scoring service only.

Type: str

property number_of_items: int | None
Number of purchased items or services. 99 if more than 99 items

Type: int

to_dictionary() dict[source]
property usecase: str | None
Indicates the type of payment for which an authentication is requested

Type: str

class onlinepayments.sdk.domain.payment_product3012.PaymentProduct3012[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3012__qr_code': typing.Optional[str], '_PaymentProduct3012__url_intent': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct3012[source]
property qr_code: str | None
Contains a value which can be used to build a QR code (intended to be scanned by a device with the Bancontact app)

Type: str

to_dictionary() dict[source]
property url_intent: str | None
Contains URL intent that can be used as the link of an “open the app” button on a device

Type: str

class onlinepayments.sdk.domain.payment_product3012_specific_input.PaymentProduct3012SpecificInput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3012SpecificInput__force_authentication': typing.Optional[bool], '_PaymentProduct3012SpecificInput__is_deferred_payment': typing.Optional[bool], '_PaymentProduct3012SpecificInput__is_wip_transaction': typing.Optional[bool], '_PaymentProduct3012SpecificInput__wip_merchant_authentication_method': typing.Optional[str]}
property force_authentication: bool | None
Indicate whether 3D Secure authentication should be forced.

Type: bool

from_dictionary(dictionary: dict) PaymentProduct3012SpecificInput[source]
property is_deferred_payment: bool | None
Indicate whether its a deferred payment.

Type: bool

property is_wip_transaction: bool | None
Indicate whether its wallet initiated payment.

Type: bool

to_dictionary() dict[source]
property wip_merchant_authentication_method: str | None
Indicates how the cardholder was authenticated to the Merchant Wallet in the context of the transaction to which the BEPAF is attached
  • 01 = Username/password or PIN login successfully performed by cardholder.

  • 02 = Authentication through Secret/Private Key in Secure Hardware Solution was successfully performed.

  • 04 = Authentication through Secret/Private Key in Secure Software Solution (for example, mobile App) was successfully performed.

  • 08 = Location-based Authentication was successfully performed.

  • 10 = Environmental Authentication in Secure Software Solution (mobile App) was successfully performed.

  • 20 = Behavioral Analysis was successfully performed.

  • 40 = Biometrics Authentication was successfully performed.

  • 80 = Out of band user authentication was successfully performed.

Type: str

class onlinepayments.sdk.domain.payment_product3013_specific_input.PaymentProduct3013SpecificInput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3013SpecificInput__market_number': typing.Optional[str], '_PaymentProduct3013SpecificInput__purchasing_buyer_reference1': typing.Optional[str], '_PaymentProduct3013SpecificInput__purchasing_buyer_reference2': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct3013SpecificInput[source]
property market_number: str | None
An identifier that refers to the public tender

Type: str

property purchasing_buyer_reference1: str | None
An identifier allocated by the government

Type: str

property purchasing_buyer_reference2: str | None
An identifier allocated by the government

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product302_specific_data.PaymentProduct302SpecificData[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct302SpecificData__networks': typing.Optional[typing.List[str]]}
from_dictionary(dictionary: dict) PaymentProduct302SpecificData[source]
property networks: List[str] | None
The networks that can be used in the current payment context. The strings that represent the networks in the array are identical to the strings that Apple uses in their documentation. For instance “Visa”.

Type: list[str]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product3203_specific_output.PaymentProduct3203SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3203SpecificOutput__billing_address': typing.Optional[onlinepayments.sdk.domain.address_personal.AddressPersonal], '_PaymentProduct3203SpecificOutput__shipping_address': typing.Optional[onlinepayments.sdk.domain.address_personal.AddressPersonal]}
property billing_address: AddressPersonal | None
Object containing address information

Type: onlinepayments.sdk.domain.address_personal.AddressPersonal

from_dictionary(dictionary: dict) PaymentProduct3203SpecificOutput[source]
property shipping_address: AddressPersonal | None
Object containing address information

Type: onlinepayments.sdk.domain.address_personal.AddressPersonal

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product3204_specific_output.PaymentProduct3204SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3204SpecificOutput__banking_app_label': typing.Optional[str]}
property banking_app_label: str | None
The name given by the bank (the publisher of the mobile application) to identify the mobile account where the User will confirm the payment

Type: str

from_dictionary(dictionary: dict) PaymentProduct3204SpecificOutput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product3208_specific_input.PaymentProduct3208SpecificInput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3208SpecificInput__merchant_finance_code': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct3208SpecificInput[source]
property merchant_finance_code: str | None
This field indicates the finance code provided by the merchant after the buyer has selected the proper financing option.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product3208_specific_output.PaymentProduct3208SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3208SpecificOutput__buyer_compliant_bank_message': typing.Optional[str]}
property buyer_compliant_bank_message: str | None
This field indicates the text that must be returned and shown to the buyer to be compliant with the law regulating this payment product.

Type: str

from_dictionary(dictionary: dict) PaymentProduct3208SpecificOutput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product3209_specific_input.PaymentProduct3209SpecificInput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3209SpecificInput__merchant_finance_code': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct3209SpecificInput[source]
property merchant_finance_code: str | None
This field indicates the finance code provided by the merchant after the buyer has selected the proper financing option.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product3209_specific_output.PaymentProduct3209SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct3209SpecificOutput__buyer_compliant_bank_message': typing.Optional[str]}
property buyer_compliant_bank_message: str | None
This field indicates the text that must be returned and shown to the buyer to be compliant with the law regulating this payment product.

Type: str

from_dictionary(dictionary: dict) PaymentProduct3209SpecificOutput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product320_specific_data.PaymentProduct320SpecificData[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct320SpecificData__gateway': typing.Optional[str], '_PaymentProduct320SpecificData__networks': typing.Optional[typing.List[str]]}
from_dictionary(dictionary: dict) PaymentProduct320SpecificData[source]
property gateway: str | None
The gateway identifier. You should use this when creating a tokenization specification .

Type: str

property networks: List[str] | None
The networks that can be used in the current payment context. The strings that represent the networks in the array are identical to the strings that GooglePay uses in their documentation. For instance “Visa”.

Type: list[str]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product350.PaymentProduct350[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct350__app_switch_link': typing.Optional[str], '_PaymentProduct350__payment_request_token': typing.Optional[str]}
Contains an application switch URL for opening the Swish application on a mobile device (intended to be used by a device with the Swish app installed)

Type: str

from_dictionary(dictionary: dict) PaymentProduct350[source]
property payment_request_token: str | None
Contains the token that identifies the payment on the Swish side. This can be used to generate a QR code (either manually or by calling the public QR Code API of Swish) to be scanned by the Swish app.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5001.PaymentProduct5001[source]

Bases: DataObject

Deprecated; Deprecated by pendingAuthentication. Contains the third party data for payment product 5001 (Bizum)

__annotations__ = {'_PaymentProduct5001__message': typing.Optional[str], '_PaymentProduct5001__polling_url': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct5001[source]
property message: str | None
A text string intended to be displayed to the consumer

Type: str

property polling_url: str | None
A URL that must be polled using JavaScript; it responds with either true or false to say if transaction is still pending or not. As long as the response status is ‘true’, the message should be shown and polling should continue. Once the status changes to ‘false’, you should verify the payment outcome and redirect the customer to your status page accordingly. Remember, a pending status ‘false’ indicates that the Bizum process has concluded, but it does not necessarily confirm a successful payment. And if you end the polling after a few minutes without receiving the status ‘false’, it means that the transaction can’t be ended as accepted or refused yet. NB - If you try to call the polling endpoint with invalid data, you will receive an http 204.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5001_specific_output.PaymentProduct5001SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct5001SpecificOutput__account_number': typing.Optional[str], '_PaymentProduct5001SpecificOutput__authorisation_code': typing.Optional[str], '_PaymentProduct5001SpecificOutput__liability': typing.Optional[str], '_PaymentProduct5001SpecificOutput__mobile_phone_number': typing.Optional[str], '_PaymentProduct5001SpecificOutput__operation_code': typing.Optional[str]}
property account_number: str | None
The account number is associated with the funding.

Type: str

property authorisation_code: str | None
The reference returned by redsys to identify the transaction

Type: str

from_dictionary(dictionary: dict) PaymentProduct5001SpecificOutput[source]
property liability: str | None
Determines the Fraud liability. Possible values are:
  • issuer - Fraud liability shifts to the issuer (eq. exemption accepted)

  • merchant - Fraud liability with the merchant Note: When not filled in, Fraud liability is not applicable for the current transaction.

Type: str

property mobile_phone_number: str | None
The mobile phone number used for this transaction

Type: str

property operation_code: str | None
The reference returned by redsys to identify the operation

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5100_specific_input.PaymentProduct5100SpecificInput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct5100SpecificInput__brand': typing.Optional[str]}
property brand: str | None
Indicate whether to use a specific Cpay brand. Brands are configurable at the payment method level. See BackOffice Cpay configuration for allowed values.

Type: str

from_dictionary(dictionary: dict) PaymentProduct5100SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5402_specific_output.PaymentProduct5402SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct5402SpecificOutput__brand': typing.Optional[str]}
property brand: str | None
The specific meal voucher brand used for the transaction

Type: str

from_dictionary(dictionary: dict) PaymentProduct5402SpecificOutput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5404.PaymentProduct5404[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct5404__app_switch_link': typing.Optional[str], '_PaymentProduct5404__qr_code_url': typing.Optional[str]}
Contains a application switch url that should open WeChat Pay application in mobile device (intended to be used by a device with the WeChat Pay app)

Type: str

from_dictionary(dictionary: dict) PaymentProduct5404[source]
property qr_code_url: str | None
Contains a QR code url that can be used to build a QR code (intended to be scanned by a device with the WeChat Pay app)

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5407.PaymentProduct5407[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct5407__pairing_token': typing.Optional[str], '_PaymentProduct5407__qr_code': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct5407[source]
property pairing_token: str | None
A numeric token, which the user has to copy or type into the TWINT app in order to pair it with the merchant for the payment process.

Type: str

property qr_code: str | None
Contains a base64 encoded PNG image. By prepending data:image/png;base64, this value can be used as the source of an HTML inline image on a desktop or tablet (intended to be scanned by a device with the Twint app)

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product5500_specific_output.PaymentProduct5500SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct5500SpecificOutput__entity_id': typing.Optional[str], '_PaymentProduct5500SpecificOutput__payment_end_date': typing.Optional[str], '_PaymentProduct5500SpecificOutput__payment_reference': typing.Optional[str], '_PaymentProduct5500SpecificOutput__payment_start_date': typing.Optional[str]}
property entity_id: str | None
The reference to be used during Multibanco payment for reconciliation matter

Type: str

from_dictionary(dictionary: dict) PaymentProduct5500SpecificOutput[source]
property payment_end_date: str | None
The end date of the payment validity

Type: str

property payment_reference: str | None
The reference to be used within the Multibanco network to confirm the payment

Type: str

property payment_start_date: str | None
The start date of the payment validity

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product771_specific_output.PaymentProduct771SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct771SpecificOutput__mandate_reference': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProduct771SpecificOutput[source]
property mandate_reference: str | None
Unique reference to a Mandate

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product840_customer_account.PaymentProduct840CustomerAccount[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct840CustomerAccount__account_id': typing.Optional[str], '_PaymentProduct840CustomerAccount__company_name': typing.Optional[str], '_PaymentProduct840CustomerAccount__country_code': typing.Optional[str], '_PaymentProduct840CustomerAccount__customer_account_status': typing.Optional[str], '_PaymentProduct840CustomerAccount__customer_address_status': typing.Optional[str], '_PaymentProduct840CustomerAccount__first_name': typing.Optional[str], '_PaymentProduct840CustomerAccount__payer_id': typing.Optional[str], '_PaymentProduct840CustomerAccount__surname': typing.Optional[str]}
property account_id: str | None
Username with which the PayPal account holder has registered at PayPal

Type: str

property company_name: str | None
Name of the company in case the PayPal account is owned by a business

Type: str

property country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

property customer_account_status: str | None
Status of the PayPal account
  • verified - PayPal has verified the funding means for this account

  • unverified - PayPal has not verified the funding means for this account

Type: str

property customer_address_status: str | None
Status of the customer’s shipping address as registered by PayPal
  • none - Status is unknown at PayPal

  • confirmed - The address has been confirmed

  • unconfirmed - The address has not been confirmed

Type: str

property first_name: str | None
First name of the PayPal account holder

Type: str

from_dictionary(dictionary: dict) PaymentProduct840CustomerAccount[source]
property payer_id: str | None
The unique identifier of a PayPal account and will never change in the life cycle of a PayPal account

Type: str

property surname: str | None
Surname of the PayPal account holder

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product840_specific_output.PaymentProduct840SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentProduct840SpecificOutput__billing_address': typing.Optional[onlinepayments.sdk.domain.address.Address], '_PaymentProduct840SpecificOutput__billing_personal_address': typing.Optional[onlinepayments.sdk.domain.address_personal.AddressPersonal], '_PaymentProduct840SpecificOutput__customer_account': typing.Optional[onlinepayments.sdk.domain.payment_product840_customer_account.PaymentProduct840CustomerAccount], '_PaymentProduct840SpecificOutput__customer_address': typing.Optional[onlinepayments.sdk.domain.address.Address], '_PaymentProduct840SpecificOutput__pay_pal_transaction_id': typing.Optional[str], '_PaymentProduct840SpecificOutput__protection_eligibility': typing.Optional[onlinepayments.sdk.domain.protection_eligibility.ProtectionEligibility], '_PaymentProduct840SpecificOutput__shipping_address': typing.Optional[onlinepayments.sdk.domain.address_personal.AddressPersonal]}
property billing_address: Address | None
Object containing billing address details.

Type: onlinepayments.sdk.domain.address.Address

property billing_personal_address: AddressPersonal | None
Object containing address information

Type: onlinepayments.sdk.domain.address_personal.AddressPersonal

property customer_account: PaymentProduct840CustomerAccount | None
Object containing the details of the PayPal account

Type: onlinepayments.sdk.domain.payment_product840_customer_account.PaymentProduct840CustomerAccount

property customer_address: Address | None
Object containing billing address details.

Type: onlinepayments.sdk.domain.address.Address

from_dictionary(dictionary: dict) PaymentProduct840SpecificOutput[source]
property pay_pal_transaction_id: str | None
Id of a transaction given by PayPal

Type: str

property protection_eligibility: ProtectionEligibility | None
Kind of seller protection in force for the PayPal transaction

Type: onlinepayments.sdk.domain.protection_eligibility.ProtectionEligibility

property shipping_address: AddressPersonal | None
Object containing address information

Type: onlinepayments.sdk.domain.address_personal.AddressPersonal

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints[source]

Bases: DataObject

__annotations__ = {'_PaymentProductDisplayHints__display_order': typing.Optional[int], '_PaymentProductDisplayHints__label': typing.Optional[str], '_PaymentProductDisplayHints__logo': typing.Optional[str]}
property display_order: int | None
Determines the order in which the payment products and groups should be shown (sorted ascending)

Type: int

from_dictionary(dictionary: dict) PaymentProductDisplayHints[source]
property label: str | None
Name of the payment product or group based on the locale that was included in the request

Type: str

Partial URL that you can reference for the image of this payment product. You can use our server-side resize functionality by appending ‘?size={{width}}x{{height}}’ to the full URL, where width and height are specified in pixels. The resized image will always keep its correct aspect ratio.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_field.PaymentProductField[source]

Bases: DataObject

__annotations__ = {'_PaymentProductField__data_restrictions': typing.Optional[onlinepayments.sdk.domain.payment_product_field_data_restrictions.PaymentProductFieldDataRestrictions], '_PaymentProductField__display_hints': typing.Optional[onlinepayments.sdk.domain.payment_product_field_display_hints.PaymentProductFieldDisplayHints], '_PaymentProductField__id': typing.Optional[str], '_PaymentProductField__type': typing.Optional[str]}
property data_restrictions: PaymentProductFieldDataRestrictions | None
Object containing data restrictions that apply to this field, like minimum and/or maximum length

Type: onlinepayments.sdk.domain.payment_product_field_data_restrictions.PaymentProductFieldDataRestrictions

property display_hints: PaymentProductFieldDisplayHints | None
Object containing display hints for this field, like the order, mask, preferred keyboard

Type: onlinepayments.sdk.domain.payment_product_field_display_hints.PaymentProductFieldDisplayHints

from_dictionary(dictionary: dict) PaymentProductField[source]
property id: str | None

Type: str

to_dictionary() dict[source]
property type: str | None

Type: str

class onlinepayments.sdk.domain.payment_product_field_data_restrictions.PaymentProductFieldDataRestrictions[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFieldDataRestrictions__is_required': typing.Optional[bool], '_PaymentProductFieldDataRestrictions__validators': typing.Optional[onlinepayments.sdk.domain.payment_product_field_validators.PaymentProductFieldValidators]}
from_dictionary(dictionary: dict) PaymentProductFieldDataRestrictions[source]
property is_required: bool | None
  • true - Indicates that this field is required

  • false - Indicates that this field is optional

Type: bool

to_dictionary() dict[source]
property validators: PaymentProductFieldValidators | None
Object containing the details of the validations on the field

Type: onlinepayments.sdk.domain.payment_product_field_validators.PaymentProductFieldValidators

class onlinepayments.sdk.domain.payment_product_field_display_element.PaymentProductFieldDisplayElement[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFieldDisplayElement__id': typing.Optional[str], '_PaymentProductFieldDisplayElement__label': typing.Optional[str], '_PaymentProductFieldDisplayElement__type': typing.Optional[str], '_PaymentProductFieldDisplayElement__value': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProductFieldDisplayElement[source]
property id: str | None
The ID of the display element.

Type: str

property label: str | None
The label of the display element.

Type: str

to_dictionary() dict[source]
property type: str | None
The type of the display element. Indicates how the value should be presented. Possible values are:
  • STRING - as plain text

  • CURRENCY - as an amount in cents displayed with a decimal separator and the currency of the payment

  • PERCENTAGE - as a number with a percentage sign

  • INTEGER - as an integer

  • URI - as a link

Type: str

property value: str | None
the value of the display element.

Type: str

class onlinepayments.sdk.domain.payment_product_field_display_hints.PaymentProductFieldDisplayHints[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFieldDisplayHints__always_show': typing.Optional[bool], '_PaymentProductFieldDisplayHints__display_order': typing.Optional[int], '_PaymentProductFieldDisplayHints__form_element': typing.Optional[onlinepayments.sdk.domain.payment_product_field_form_element.PaymentProductFieldFormElement], '_PaymentProductFieldDisplayHints__label': typing.Optional[str], '_PaymentProductFieldDisplayHints__link': typing.Optional[str], '_PaymentProductFieldDisplayHints__mask': typing.Optional[str], '_PaymentProductFieldDisplayHints__obfuscate': typing.Optional[bool], '_PaymentProductFieldDisplayHints__placeholder_label': typing.Optional[str], '_PaymentProductFieldDisplayHints__preferred_input_type': typing.Optional[str], '_PaymentProductFieldDisplayHints__tooltip': typing.Optional[onlinepayments.sdk.domain.payment_product_field_tooltip.PaymentProductFieldTooltip]}
property always_show: bool | None
  • true - Indicates that this field is advised to be captured to increase the success rates even-though it isn’t marked as required. Please note that making the field required could hurt the success rates negatively. This boolean only indicates our advise to always show this field to the customer.

  • false - Indicates that this field is not to be shown unless it is a required field.

Type: bool

property display_order: int | None
The order in which the fields should be shown (ascending)

Type: int

property form_element: PaymentProductFieldFormElement | None
Object detailing the type of form element that should be used to present the field

Type: onlinepayments.sdk.domain.payment_product_field_form_element.PaymentProductFieldFormElement

from_dictionary(dictionary: dict) PaymentProductFieldDisplayHints[source]
property label: str | None
Label/Name of the field to be used in the user interface

Type: str

Deprecated: This field is not used by any payment product Link that should be used to replace the ‘{link}’ variable in the label.

Type: str

Deprecated; Deprecated

property mask: str | None
A mask that can be used in the input field. You can use it to inject additional characters to provide a better user experience and to restrict the accepted character set (illegal characters will be ignored during typing).
  • is used for wildcards (and also chars) 9 is used for numbers Everything outside {{ and }} is used as-is.

Type: str

property obfuscate: bool | None
  • true - The data in this field should be obfuscated as it is entered, just like a password field

  • false - The data in this field does not need to be obfuscated

Type: bool

property placeholder_label: str | None
A placeholder value for the form element

Type: str

property preferred_input_type: str | None
The type of keyboard that can best be used to fill out the value of this field. Possible values are:
  • PhoneNumberKeyboard - Keyboard that is normally used to enter phone numbers

  • StringKeyboard - Keyboard that is used to enter strings

  • IntegerKeyboard - Keyboard that is used to enter only numerical values

  • EmailAddressKeyboard - Keyboard that allows easier entry of email addresses

Type: str

to_dictionary() dict[source]
property tooltip: PaymentProductFieldTooltip | None
Object that contains an optional tooltip to assist the customer

Type: onlinepayments.sdk.domain.payment_product_field_tooltip.PaymentProductFieldTooltip

class onlinepayments.sdk.domain.payment_product_field_form_element.PaymentProductFieldFormElement[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFieldFormElement__type': typing.Optional[str], '_PaymentProductFieldFormElement__value_mapping': typing.Optional[typing.List[onlinepayments.sdk.domain.value_mapping_element.ValueMappingElement]]}
from_dictionary(dictionary: dict) PaymentProductFieldFormElement[source]
to_dictionary() dict[source]
property type: str | None
Type of form element to be used. The following types can be returned:
  • text - A normal text input field

  • list - A list of values that the customer needs to choose from, is detailed in the valueMapping array

  • currency - Currency fields should be split into two fields, with the second one being specifically for the cents

  • boolean - Boolean fields should offer the customer a choice, like accepting the terms and conditions of a product.

  • date - let the customer pick a date.

Type: str

property value_mapping: List[ValueMappingElement] | None
Deprecated: This field is not used by any payment product

Type: list[onlinepayments.sdk.domain.value_mapping_element.ValueMappingElement]

Deprecated; This field is not used by any payment product

class onlinepayments.sdk.domain.payment_product_field_tooltip.PaymentProductFieldTooltip[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFieldTooltip__image': typing.Optional[str], '_PaymentProductFieldTooltip__label': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentProductFieldTooltip[source]
property image: str | None
Deprecated: This field is not used by any payment product Relative URL that can be used to retrieve an image for the tooltip image.

Type: str

Deprecated; This field is not used by any payment product Relative URL that can be used to retrieve an image for the tooltip image.

property label: str | None
A text explaining the field in more detail. This is meant to be used for displaying to the customer.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_field_validators.PaymentProductFieldValidators[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFieldValidators__email_address': typing.Optional[onlinepayments.sdk.domain.empty_validator.EmptyValidator], '_PaymentProductFieldValidators__expiration_date': typing.Optional[onlinepayments.sdk.domain.empty_validator.EmptyValidator], '_PaymentProductFieldValidators__fixed_list': typing.Optional[onlinepayments.sdk.domain.fixed_list_validator.FixedListValidator], '_PaymentProductFieldValidators__iban': typing.Optional[onlinepayments.sdk.domain.empty_validator.EmptyValidator], '_PaymentProductFieldValidators__length': typing.Optional[onlinepayments.sdk.domain.length_validator.LengthValidator], '_PaymentProductFieldValidators__luhn': typing.Optional[onlinepayments.sdk.domain.empty_validator.EmptyValidator], '_PaymentProductFieldValidators__range': typing.Optional[onlinepayments.sdk.domain.range_validator.RangeValidator], '_PaymentProductFieldValidators__regular_expression': typing.Optional[onlinepayments.sdk.domain.regular_expression_validator.RegularExpressionValidator], '_PaymentProductFieldValidators__terms_and_conditions': typing.Optional[onlinepayments.sdk.domain.empty_validator.EmptyValidator]}
property email_address: EmptyValidator | None

Type: onlinepayments.sdk.domain.empty_validator.EmptyValidator

property expiration_date: EmptyValidator | None

Type: onlinepayments.sdk.domain.empty_validator.EmptyValidator

property fixed_list: FixedListValidator | None

Type: onlinepayments.sdk.domain.fixed_list_validator.FixedListValidator

from_dictionary(dictionary: dict) PaymentProductFieldValidators[source]
property iban: EmptyValidator | None

Type: onlinepayments.sdk.domain.empty_validator.EmptyValidator

property length: LengthValidator | None

Type: onlinepayments.sdk.domain.length_validator.LengthValidator

property luhn: EmptyValidator | None

Type: onlinepayments.sdk.domain.empty_validator.EmptyValidator

property range: RangeValidator | None

Type: onlinepayments.sdk.domain.range_validator.RangeValidator

property regular_expression: RegularExpressionValidator | None

Type: onlinepayments.sdk.domain.regular_expression_validator.RegularExpressionValidator

property terms_and_conditions: EmptyValidator | None

Type: onlinepayments.sdk.domain.empty_validator.EmptyValidator

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_filter.PaymentProductFilter[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFilter__groups': typing.Optional[typing.List[str]], '_PaymentProductFilter__products': typing.Optional[typing.List[int]]}
from_dictionary(dictionary: dict) PaymentProductFilter[source]
property groups: List[str] | None
List containing all payment product groups that should either be restricted to in or excluded from the payment context. Currently, there is only one group, called ‘cards’.

Type: list[str]

property products: List[int] | None

Type: list[int]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_filter_hosted_tokenization.PaymentProductFilterHostedTokenization[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFilterHostedTokenization__products': typing.Optional[typing.List[int]]}
from_dictionary(dictionary: dict) PaymentProductFilterHostedTokenization[source]
property products: List[int] | None

Type: list[int]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_filters_hosted_checkout.PaymentProductFiltersHostedCheckout[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFiltersHostedCheckout__exclude': typing.Optional[onlinepayments.sdk.domain.payment_product_filter.PaymentProductFilter], '_PaymentProductFiltersHostedCheckout__restrict_to': typing.Optional[onlinepayments.sdk.domain.payment_product_filter.PaymentProductFilter]}
property exclude: PaymentProductFilter | None
The payment product ids to be be excluded or restricted to from the payment products available for the payment. Note that you can add exclusions on top of the ‘restrictTo’ filter.

Type: onlinepayments.sdk.domain.payment_product_filter.PaymentProductFilter

from_dictionary(dictionary: dict) PaymentProductFiltersHostedCheckout[source]
property restrict_to: PaymentProductFilter | None
The payment product ids to be be excluded or restricted to from the payment products available for the payment. Note that you can add exclusions on top of the ‘restrictTo’ filter.

Type: onlinepayments.sdk.domain.payment_product_filter.PaymentProductFilter

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_filters_hosted_tokenization.PaymentProductFiltersHostedTokenization[source]

Bases: DataObject

__annotations__ = {'_PaymentProductFiltersHostedTokenization__exclude': typing.Optional[onlinepayments.sdk.domain.payment_product_filter_hosted_tokenization.PaymentProductFilterHostedTokenization], '_PaymentProductFiltersHostedTokenization__restrict_to': typing.Optional[onlinepayments.sdk.domain.payment_product_filter_hosted_tokenization.PaymentProductFilterHostedTokenization]}
property exclude: PaymentProductFilterHostedTokenization | None
The payment product ids to be be excluded or restricted to from the payment products available for the payment. Note that you can add exclusions on top of the ‘restrictTo’ filter.

Type: onlinepayments.sdk.domain.payment_product_filter_hosted_tokenization.PaymentProductFilterHostedTokenization

from_dictionary(dictionary: dict) PaymentProductFiltersHostedTokenization[source]
property restrict_to: PaymentProductFilterHostedTokenization | None
The payment product ids to be be excluded or restricted to from the payment products available for the payment. Note that you can add exclusions on top of the ‘restrictTo’ filter.

Type: onlinepayments.sdk.domain.payment_product_filter_hosted_tokenization.PaymentProductFilterHostedTokenization

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_group.PaymentProductGroup[source]

Bases: DataObject

__annotations__ = {'_PaymentProductGroup__account_on_file': typing.Optional[onlinepayments.sdk.domain.account_on_file.AccountOnFile], '_PaymentProductGroup__display_hints': typing.Optional[onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints], '_PaymentProductGroup__display_hints_list': typing.Optional[typing.List[onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints]], '_PaymentProductGroup__id': typing.Optional[str]}
property account_on_file: AccountOnFile | None

Type: onlinepayments.sdk.domain.account_on_file.AccountOnFile

property display_hints: PaymentProductDisplayHints | None
Object containing display hints like the order of the product when shown in a list, the name of the product and the logo

Type: onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints

property display_hints_list: List[PaymentProductDisplayHints] | None

Type: list[onlinepayments.sdk.domain.payment_product_display_hints.PaymentProductDisplayHints]

from_dictionary(dictionary: dict) PaymentProductGroup[source]
property id: str | None
The ID of the payment product group in our system

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_product_networks_response.PaymentProductNetworksResponse[source]

Bases: DataObject

__annotations__ = {'_PaymentProductNetworksResponse__networks': typing.Optional[typing.List[str]]}
from_dictionary(dictionary: dict) PaymentProductNetworksResponse[source]
property networks: List[str] | None

Type: list[str]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_references.PaymentReferences[source]

Bases: DataObject

__annotations__ = {'_PaymentReferences__merchant_parameters': typing.Optional[str], '_PaymentReferences__merchant_reference': typing.Optional[str], '_PaymentReferences__operation_group_reference': typing.Optional[str]}
from_dictionary(dictionary: dict) PaymentReferences[source]
property merchant_parameters: str | None
It allows you to store additional parameters for the transaction in the format you prefer (e.g.-> key-value query string, JSON, etc.) These parameters are then echoed back to you in API GET calls and Webhook notifications. This field must not contain any personal data.

Type: str

property merchant_reference: str | None
Your unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files. It is highly recommended to provide a single MerchantReference per unique order on your side

Type: str

property operation_group_reference: str | None
An identifier for a group of transactions. This reference helps to link multiple related transactions together, facilitating easier reconciliation and tracking.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_response.PaymentResponse[source]

Bases: DataObject

__annotations__ = {'_PaymentResponse__hosted_checkout_specific_output': typing.Optional[onlinepayments.sdk.domain.hosted_checkout_specific_output.HostedCheckoutSpecificOutput], '_PaymentResponse__id': typing.Optional[str], '_PaymentResponse__payment_output': typing.Optional[onlinepayments.sdk.domain.payment_output.PaymentOutput], '_PaymentResponse__session_details': typing.Optional[onlinepayments.sdk.domain.session_details.SessionDetails], '_PaymentResponse__status': typing.Optional[str], '_PaymentResponse__status_output': typing.Optional[onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput]}
from_dictionary(dictionary: dict) PaymentResponse[source]
property hosted_checkout_specific_output: HostedCheckoutSpecificOutput | None
Hosted Checkout specific information. Populated if the payment was created on the platform through a Hosted Checkout.

Type: onlinepayments.sdk.domain.hosted_checkout_specific_output.HostedCheckoutSpecificOutput

property id: str | None
This is our unique payment transaction identifier.

Type: str

property payment_output: PaymentOutput | None
Object containing payment details

Type: onlinepayments.sdk.domain.payment_output.PaymentOutput

property session_details: SessionDetails | None
Session context information. This denotes the origin of the payment session, where the session originated from and that session’s unique identifier

Type: onlinepayments.sdk.domain.session_details.SessionDetails

property status: str | None
Current high-level status of the payment in a human-readable form.

Type: str

property status_output: PaymentStatusOutput | None
This object has the numeric representation of the current payment status, the timestamp of the last status change, and the performable action on the current payment resource. In case of failed payments and negative scenarios, detailed error information is listed.

Type: onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payment_status_output.PaymentStatusOutput[source]

Bases: DataObject

__annotations__ = {'_PaymentStatusOutput__errors': typing.Optional[typing.List[onlinepayments.sdk.domain.api_error.APIError]], '_PaymentStatusOutput__is_authorized': typing.Optional[bool], '_PaymentStatusOutput__is_cancellable': typing.Optional[bool], '_PaymentStatusOutput__is_refundable': typing.Optional[bool], '_PaymentStatusOutput__status_category': typing.Optional[str], '_PaymentStatusOutput__status_code': typing.Optional[int], '_PaymentStatusOutput__status_code_change_date_time': typing.Optional[str]}
property errors: List[APIError] | None

Type: list[onlinepayments.sdk.domain.api_error.APIError]

from_dictionary(dictionary: dict) PaymentStatusOutput[source]
property is_authorized: bool | None
Indicates if the transaction has been authorized

Type: bool

property is_cancellable: bool | None
Flag indicating if the payment can be cancelled

Type: bool

property is_refundable: bool | None
This is a flag indicating whether the payment can be refunded.

Type: bool

property status_category: str | None
Highlevel status of the payment, payout or refund.

Type: str

property status_code: int | None
Numeric status code of the legacy API. The value can also be found in the BackOffice and in report files.

Type: int

property status_code_change_date_time: str | None
Timestamp of the latest status change

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payout_error_response.PayoutErrorResponse[source]

Bases: DataObject

__annotations__ = {'_PayoutErrorResponse__error_id': typing.Optional[str], '_PayoutErrorResponse__errors': typing.Optional[typing.List[onlinepayments.sdk.domain.api_error.APIError]], '_PayoutErrorResponse__payout_result': typing.Optional[onlinepayments.sdk.domain.payout_result.PayoutResult]}
property error_id: str | None

Type: str

property errors: List[APIError] | None

Type: list[onlinepayments.sdk.domain.api_error.APIError]

from_dictionary(dictionary: dict) PayoutErrorResponse[source]
property payout_result: PayoutResult | None

Type: onlinepayments.sdk.domain.payout_result.PayoutResult

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payout_output.PayoutOutput[source]

Bases: DataObject

__annotations__ = {'_PayoutOutput__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_PayoutOutput__payout_reason': typing.Optional[str]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

from_dictionary(dictionary: dict) PayoutOutput[source]
property payout_reason: str | None
Allows you to additionally specify the reason for initiating the payout for authorization purposes. If this field is not specified, authorization of the payment will be made according to your merchant profile. Possible values are:
  • Gambling

  • Refund

  • Loyalty

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payout_response.PayoutResponse[source]

Bases: DataObject

__annotations__ = {'_PayoutResponse__id': typing.Optional[str], '_PayoutResponse__payout_output': typing.Optional[onlinepayments.sdk.domain.payout_output.PayoutOutput], '_PayoutResponse__status': typing.Optional[str], '_PayoutResponse__status_output': typing.Optional[onlinepayments.sdk.domain.payout_status_output.PayoutStatusOutput]}
from_dictionary(dictionary: dict) PayoutResponse[source]
property id: str | None

Type: str

property payout_output: PayoutOutput | None

Type: onlinepayments.sdk.domain.payout_output.PayoutOutput

property status: str | None
Current high-level status of the payout in a human-readable form.

Type: str

property status_output: PayoutStatusOutput | None

Type: onlinepayments.sdk.domain.payout_status_output.PayoutStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payout_result.PayoutResult[source]

Bases: DataObject

__annotations__ = {'_PayoutResult__id': typing.Optional[str], '_PayoutResult__payout_output': typing.Optional[onlinepayments.sdk.domain.payout_output.PayoutOutput], '_PayoutResult__status': typing.Optional[str], '_PayoutResult__status_output': typing.Optional[onlinepayments.sdk.domain.payout_status_output.PayoutStatusOutput]}
from_dictionary(dictionary: dict) PayoutResult[source]
property id: str | None

Type: str

property payout_output: PayoutOutput | None

Type: onlinepayments.sdk.domain.payout_output.PayoutOutput

property status: str | None
Current high-level status of the payout in a human-readable form.

Type: str

property status_output: PayoutStatusOutput | None

Type: onlinepayments.sdk.domain.payout_status_output.PayoutStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.payout_status_output.PayoutStatusOutput[source]

Bases: DataObject

__annotations__ = {'_PayoutStatusOutput__is_cancellable': typing.Optional[bool], '_PayoutStatusOutput__status_category': typing.Optional[str], '_PayoutStatusOutput__status_code': typing.Optional[int]}
from_dictionary(dictionary: dict) PayoutStatusOutput[source]
property is_cancellable: bool | None
Flag indicating if the payout can be cancelled
  • true

  • false

Type: bool

property status_category: str | None
Highlevel status of the payment, payout or refund.

Type: str

property status_code: int | None
Numeric status code of the legacy API. The value can also be found in the BackOffice and in report files.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.pending_authentication.PendingAuthentication[source]

Bases: DataObject

__annotations__ = {'_PendingAuthentication__polling_url': typing.Optional[str]}
from_dictionary(dictionary: dict) PendingAuthentication[source]
property polling_url: str | None
A URL that must be polled using JavaScript; it responds with either true or false to say if transaction is still pending or not. As long as the response status is ‘true’, the message should be shown and polling should continue. Once the status changes to ‘false’, you should verify the payment outcome and redirect the customer to your status page accordingly. Remember, a pending status ‘false’ indicates that the CV Connect process has concluded, but it does not necessarily confirm a successful payment. And if you end the polling after a few minutes without receiving the status ‘false’, it means that the transaction can’t be ended as accepted or refused yet. NB - If you try to call the polling endpoint with invalid data, you will receive an http 204.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.personal_information.PersonalInformation[source]

Bases: DataObject

__annotations__ = {'_PersonalInformation__date_of_birth': typing.Optional[str], '_PersonalInformation__gender': typing.Optional[str], '_PersonalInformation__name': typing.Optional[onlinepayments.sdk.domain.personal_name.PersonalName]}
property date_of_birth: str | None
The date of birth of the customer of the recipient of the loan. Format YYYYMMDD

Type: str

from_dictionary(dictionary: dict) PersonalInformation[source]
property gender: str | None
The gender of the customer. All values are possible as long as it does not exceed the maximum length of 50 characters.

Type: str

property name: PersonalName | None
Object containing the name details of the customer

Type: onlinepayments.sdk.domain.personal_name.PersonalName

to_dictionary() dict[source]
class onlinepayments.sdk.domain.personal_information_token.PersonalInformationToken[source]

Bases: DataObject

__annotations__ = {'_PersonalInformationToken__name': typing.Optional[onlinepayments.sdk.domain.personal_name_token.PersonalNameToken]}
from_dictionary(dictionary: dict) PersonalInformationToken[source]
property name: PersonalNameToken | None

Type: onlinepayments.sdk.domain.personal_name_token.PersonalNameToken

to_dictionary() dict[source]
class onlinepayments.sdk.domain.personal_name.PersonalName[source]

Bases: DataObject

__annotations__ = {'_PersonalName__first_name': typing.Optional[str], '_PersonalName__surname': typing.Optional[str], '_PersonalName__title': typing.Optional[str]}
property first_name: str | None
Given name(s) or first name(s) of the customer

Type: str

from_dictionary(dictionary: dict) PersonalName[source]
property surname: str | None
Surname(s) or last name(s) of the customer

Type: str

property title: str | None
Title of customer

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.personal_name_token.PersonalNameToken[source]

Bases: DataObject

__annotations__ = {'_PersonalNameToken__first_name': typing.Optional[str], '_PersonalNameToken__surname': typing.Optional[str]}
property first_name: str | None

Type: str

from_dictionary(dictionary: dict) PersonalNameToken[source]
property surname: str | None

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.product302_recurring.Product302Recurring[source]

Bases: DataObject

__annotations__ = {'_Product302Recurring__recurring_payment_sequence_indicator': typing.Optional[str]}
from_dictionary(dictionary: dict) Product302Recurring[source]
property recurring_payment_sequence_indicator: str | None
  • first = This transaction is the first of a series of recurring transactions

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.product320_recurring.Product320Recurring[source]

Bases: DataObject

__annotations__ = {'_Product320Recurring__recurring_payment_sequence_indicator': typing.Optional[str]}
from_dictionary(dictionary: dict) Product320Recurring[source]
property recurring_payment_sequence_indicator: str | None
  • first = This transaction is the first of a series of recurring transactions

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.product_directory.ProductDirectory[source]

Bases: DataObject

__annotations__ = {'_ProductDirectory__entries': typing.Optional[typing.List[onlinepayments.sdk.domain.directory_entry.DirectoryEntry]]}
property entries: List[DirectoryEntry] | None
List of entries in the directory

Type: list[onlinepayments.sdk.domain.directory_entry.DirectoryEntry]

from_dictionary(dictionary: dict) ProductDirectory[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.protection_eligibility.ProtectionEligibility[source]

Bases: DataObject

__annotations__ = {'_ProtectionEligibility__eligibility': typing.Optional[str], '_ProtectionEligibility__type': typing.Optional[str]}
property eligibility: str | None
  • Eligible - Merchant is protected by PayPal’s Seller Protection Policy for Unauthorized Payment and Item Not Received

  • PartiallyEligible - Merchant is protected by PayPal’s Seller Protection Policy for Item Not Received

  • Ineligible — Merchant is not protected under the Seller Protection Policy

Type: str

from_dictionary(dictionary: dict) ProtectionEligibility[source]
to_dictionary() dict[source]
property type: str | None
  • ItemNotReceivedEligible - Merchant is protected by PayPal’s Seller Protection Policy for Item Not Received

  • UnauthorizedPaymentEligible - Merchant is protected by PayPal’s Seller Protection Policy for Unauthorized Payment

  • Ineligible - Merchant is not protected under the Seller Protection Policy

Type: str

class onlinepayments.sdk.domain.range_validator.RangeValidator[source]

Bases: DataObject

__annotations__ = {'_RangeValidator__max_value': typing.Optional[int], '_RangeValidator__min_value': typing.Optional[int]}
from_dictionary(dictionary: dict) RangeValidator[source]
property max_value: int | None

Type: int

property min_value: int | None

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.rate_details.RateDetails[source]

Bases: DataObject

__annotations__ = {'_RateDetails__exchange_rate': typing.Optional[float], '_RateDetails__inverted_exchange_rate': typing.Optional[float], '_RateDetails__mark_up_rate': typing.Optional[float], '_RateDetails__quotation_date_time': typing.Optional[str], '_RateDetails__source': typing.Optional[str]}
property exchange_rate: float | None
Expressed as a percentage, applied to convert the original amount into the resulting amount without charge

Type: float

from_dictionary(dictionary: dict) RateDetails[source]
property inverted_exchange_rate: float | None
Exchange rate, expressed as a percentage, applied to convert the resulting amount into the original amount

Type: float

property mark_up_rate: float | None
The markup is the percentage added to the exchange rate by a provider when they sell you currency.

Type: float

property quotation_date_time: str | None
Date and time at which the exchange rate has been quoted

Type: str

property source: str | None
Indicates the exchange rate source name. The rate source is supplied for receipt printing purposes and to meet regulatory requirements where applicable

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.reattempt_instructions.ReattemptInstructions[source]

Bases: DataObject

__annotations__ = {'_ReattemptInstructions__conditions': typing.Optional[onlinepayments.sdk.domain.reattempt_instructions_conditions.ReattemptInstructionsConditions], '_ReattemptInstructions__frozen_period': typing.Optional[int], '_ReattemptInstructions__indicator': typing.Optional[str]}
property conditions: ReattemptInstructionsConditions | None
Additional conditions to be met for reattempt. If the data is not provided by the acquirer, these fields are omitted from the response.

Type: onlinepayments.sdk.domain.reattempt_instructions_conditions.ReattemptInstructionsConditions

from_dictionary(dictionary: dict) ReattemptInstructions[source]
property frozen_period: int | None
Hours to wait before next reattempt.

Type: int

property indicator: str | None
High-level use case. frozenPeriod and conditions, when provided, only apply if indicator is one of:
  • retryLater: retry with no change;

  • updateBeforeRetry: retry requires data updates; Otherwise:

  • neverRetry: the current payment authorization cannot be retried;

  • dontStorePanCredentials: no retry and no subsequent payment attempt or payment series using this PAN from credentials on file;

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.reattempt_instructions_conditions.ReattemptInstructionsConditions[source]

Bases: DataObject

__annotations__ = {'_ReattemptInstructionsConditions__max_attempts': typing.Optional[int], '_ReattemptInstructionsConditions__max_delay': typing.Optional[int]}
from_dictionary(dictionary: dict) ReattemptInstructionsConditions[source]
property max_attempts: int | None
Max number of reattempts permitted.

Type: int

property max_delay: int | None
Max hours during which reattempt can be made.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_data.RedirectData[source]

Bases: DataObject

__annotations__ = {'_RedirectData__redirect_url': typing.Optional[str], '_RedirectData__returnmac': typing.Optional[str]}
from_dictionary(dictionary: dict) RedirectData[source]
property redirect_url: str | None
The URL that the customer should be redirected to. Be sure to redirect using the GET method

Type: str

property returnmac: str | None
A Message Authentication Code (MAC) is used to authenticate the redirection back to merchant after the payment

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_method_specific_input.RedirectPaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentMethodSpecificInput__payment_option': typing.Optional[str], '_RedirectPaymentMethodSpecificInput__payment_product11_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product11_specific_input.RedirectPaymentProduct11SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product3203_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product3203_specific_input.RedirectPaymentProduct3203SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product3204_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product3204_specific_input.RedirectPaymentProduct3204SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product3302_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product3302_specific_input.RedirectPaymentProduct3302SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product3306_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product3306_specific_input.RedirectPaymentProduct3306SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product3307_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product3307_specific_input.RedirectPaymentProduct3307SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5001_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5001_specific_input.RedirectPaymentProduct5001SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5300_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5300_specific_input.RedirectPaymentProduct5300SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5402_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5402_specific_input.RedirectPaymentProduct5402SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5403_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5403_specific_input.RedirectPaymentProduct5403SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5406_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5406_specific_input.RedirectPaymentProduct5406SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5408_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5408_specific_input.RedirectPaymentProduct5408SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5410_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5410_specific_input.RedirectPaymentProduct5410SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product5412_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product5412_specific_input.RedirectPaymentProduct5412SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product809_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product809_specific_input.RedirectPaymentProduct809SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product840_specific_input': typing.Optional[onlinepayments.sdk.domain.redirect_payment_product840_specific_input.RedirectPaymentProduct840SpecificInput], '_RedirectPaymentMethodSpecificInput__payment_product_id': typing.Optional[int], '_RedirectPaymentMethodSpecificInput__redirection_data': typing.Optional[onlinepayments.sdk.domain.redirection_data.RedirectionData], '_RedirectPaymentMethodSpecificInput__requires_approval': typing.Optional[bool], '_RedirectPaymentMethodSpecificInput__token': typing.Optional[str], '_RedirectPaymentMethodSpecificInput__tokenize': typing.Optional[bool]}
from_dictionary(dictionary: dict) RedirectPaymentMethodSpecificInput[source]
property payment_option: str | None
The specific payment option for the payment. To be used as a complement of the more generic paymentProductId (oney, banquecasino, cofidis), which allows to define a variation of the selected paymentProductId (ex: facilypay3x, banquecasino4x, cofidis3x-sansfrais, …). List of modalities included in the payment product page.

Type: str

property payment_product11_specific_input: RedirectPaymentProduct11SpecificInput | None
Object contains the inputs required to perform a bank transfer using payment product 11.

Type: onlinepayments.sdk.domain.redirect_payment_product11_specific_input.RedirectPaymentProduct11SpecificInput

property payment_product3203_specific_input: RedirectPaymentProduct3203SpecificInput | None
Object containing specific input for PostFinancePay payments (Payment product ID 3203).

Type: onlinepayments.sdk.domain.redirect_payment_product3203_specific_input.RedirectPaymentProduct3203SpecificInput

property payment_product3204_specific_input: RedirectPaymentProduct3204SpecificInput | None
BLIK (payment product 3204) specific details

Type: onlinepayments.sdk.domain.redirect_payment_product3204_specific_input.RedirectPaymentProduct3204SpecificInput

property payment_product3302_specific_input: RedirectPaymentProduct3302SpecificInput | None
Object containing specific input required for Klarna PayLater payment (Payment product ID 3302)

Type: onlinepayments.sdk.domain.redirect_payment_product3302_specific_input.RedirectPaymentProduct3302SpecificInput

property payment_product3306_specific_input: RedirectPaymentProduct3306SpecificInput | None
Object containing specific input required for Klarna payments (Payment product ID 3306)

Type: onlinepayments.sdk.domain.redirect_payment_product3306_specific_input.RedirectPaymentProduct3306SpecificInput

property payment_product3307_specific_input: RedirectPaymentProduct3307SpecificInput | None
Object containing specific input required for Klarna payments (Payment product ID 3307)

Type: onlinepayments.sdk.domain.redirect_payment_product3307_specific_input.RedirectPaymentProduct3307SpecificInput

property payment_product5001_specific_input: RedirectPaymentProduct5001SpecificInput | None
Object containing specific input required for Bizum payments

Type: onlinepayments.sdk.domain.redirect_payment_product5001_specific_input.RedirectPaymentProduct5001SpecificInput

property payment_product5300_specific_input: RedirectPaymentProduct5300SpecificInput | None
Pledg (payment product 5300) specific details

Type: onlinepayments.sdk.domain.redirect_payment_product5300_specific_input.RedirectPaymentProduct5300SpecificInput

property payment_product5402_specific_input: RedirectPaymentProduct5402SpecificInput | None
Object containing specific input required for E-Voucher payments (Payment product ID 5402)

Type: onlinepayments.sdk.domain.redirect_payment_product5402_specific_input.RedirectPaymentProduct5402SpecificInput

property payment_product5403_specific_input: RedirectPaymentProduct5403SpecificInput | None
Object containing specific input required for Chèque-Vacances Connect payments via Limonetik (Payment product ID 5403)

Type: onlinepayments.sdk.domain.redirect_payment_product5403_specific_input.RedirectPaymentProduct5403SpecificInput

property payment_product5406_specific_input: RedirectPaymentProduct5406SpecificInput | None
Object containing specific input for EPS payments (Payment product ID 5406)

Type: onlinepayments.sdk.domain.redirect_payment_product5406_specific_input.RedirectPaymentProduct5406SpecificInput

property payment_product5408_specific_input: RedirectPaymentProduct5408SpecificInput | None
Object containing specific input for Account to Account payments (Payment product ID 5408)

Type: onlinepayments.sdk.domain.redirect_payment_product5408_specific_input.RedirectPaymentProduct5408SpecificInput

property payment_product5410_specific_input: RedirectPaymentProduct5410SpecificInput | None
iDealin3 (payment product 5410) specific details

Type: onlinepayments.sdk.domain.redirect_payment_product5410_specific_input.RedirectPaymentProduct5410SpecificInput

property payment_product5412_specific_input: RedirectPaymentProduct5412SpecificInput | None
Object containing specific input required for Chèque-Vacances Connect payments via ANCV (Payment product ID 5412)

Type: onlinepayments.sdk.domain.redirect_payment_product5412_specific_input.RedirectPaymentProduct5412SpecificInput

property payment_product809_specific_input: RedirectPaymentProduct809SpecificInput | None
Deprecated, this is no longer used.

Type: onlinepayments.sdk.domain.redirect_payment_product809_specific_input.RedirectPaymentProduct809SpecificInput

property payment_product840_specific_input: RedirectPaymentProduct840SpecificInput | None
Object containing specific input required for PayPal payments (Payment product ID 840)

Type: onlinepayments.sdk.domain.redirect_payment_product840_specific_input.RedirectPaymentProduct840SpecificInput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property redirection_data: RedirectionData | None
Object containing browser specific redirection related data

Type: onlinepayments.sdk.domain.redirection_data.RedirectionData

property requires_approval: bool | None
  • true = the payment requires approval before the funds will be captured using the Approve payment or Capture payment API

  • false = the payment does not require approval, and the funds will be captured automatically

Type: bool

to_dictionary() dict[source]
property token: str | None
ID of the token to use to create the payment.

Type: str

property tokenize: bool | None
Indicates if this transaction should be tokenized
  • true - Tokenize the transaction.

  • false - Do not tokenize the transaction, unless it would be tokenized by other means such as auto-tokenization of recurring payments.

Type: bool

class onlinepayments.sdk.domain.redirect_payment_method_specific_output.RedirectPaymentMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentMethodSpecificOutput__authorisation_code': typing.Optional[str], '_RedirectPaymentMethodSpecificOutput__customer_bank_account': typing.Optional[onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount], '_RedirectPaymentMethodSpecificOutput__fraud_results': typing.Optional[onlinepayments.sdk.domain.fraud_results.FraudResults], '_RedirectPaymentMethodSpecificOutput__payment_method3204_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product3204_specific_output.PaymentProduct3204SpecificOutput], '_RedirectPaymentMethodSpecificOutput__payment_option': typing.Optional[str], '_RedirectPaymentMethodSpecificOutput__payment_product3203_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product3203_specific_output.PaymentProduct3203SpecificOutput], '_RedirectPaymentMethodSpecificOutput__payment_product5001_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product5001_specific_output.PaymentProduct5001SpecificOutput], '_RedirectPaymentMethodSpecificOutput__payment_product5402_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product5402_specific_output.PaymentProduct5402SpecificOutput], '_RedirectPaymentMethodSpecificOutput__payment_product5500_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product5500_specific_output.PaymentProduct5500SpecificOutput], '_RedirectPaymentMethodSpecificOutput__payment_product840_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product840_specific_output.PaymentProduct840SpecificOutput], '_RedirectPaymentMethodSpecificOutput__payment_product_id': typing.Optional[int], '_RedirectPaymentMethodSpecificOutput__token': typing.Optional[str]}
property authorisation_code: str | None
Card Authorization code as returned by the acquirer

Type: str

property customer_bank_account: CustomerBankAccount | None
Data of customer bank account

Type: onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount

property fraud_results: FraudResults | None
Object containing the results of the fraud screening

Type: onlinepayments.sdk.domain.fraud_results.FraudResults

from_dictionary(dictionary: dict) RedirectPaymentMethodSpecificOutput[source]
property payment_method3204_specific_output: PaymentProduct3204SpecificOutput | None
BLIK (payment product 3204) specific details

Type: onlinepayments.sdk.domain.payment_product3204_specific_output.PaymentProduct3204SpecificOutput

property payment_option: str | None
The specific payment option for the payment. To be used as a complement of the more generic paymentProductId (oney, banquecasino, cofidis), which allows to define a variation of the selected paymentProductId (ex: facilypay3x, banquecasino4x, cofidis3x-sansfrais, …). List of modalities included in the payment product page.

Type: str

property payment_product3203_specific_output: PaymentProduct3203SpecificOutput | None
PostFinancePay (payment product 3203) specific details

Type: onlinepayments.sdk.domain.payment_product3203_specific_output.PaymentProduct3203SpecificOutput

property payment_product5001_specific_output: PaymentProduct5001SpecificOutput | None
Bizum (payment product 5001) specific details

Type: onlinepayments.sdk.domain.payment_product5001_specific_output.PaymentProduct5001SpecificOutput

property payment_product5402_specific_output: PaymentProduct5402SpecificOutput | None
Meal vouchers (payment product 5402) specific details

Type: onlinepayments.sdk.domain.payment_product5402_specific_output.PaymentProduct5402SpecificOutput

property payment_product5500_specific_output: PaymentProduct5500SpecificOutput | None
Multibanco (payment product 5500) specific details

Type: onlinepayments.sdk.domain.payment_product5500_specific_output.PaymentProduct5500SpecificOutput

property payment_product840_specific_output: PaymentProduct840SpecificOutput | None
PayPal (payment product 840) specific details

Type: onlinepayments.sdk.domain.payment_product840_specific_output.PaymentProduct840SpecificOutput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
property token: str | None
ID of the token. This property is populated when the payment was done with a token or when the payment was tokenized.

Type: str

class onlinepayments.sdk.domain.redirect_payment_product11_specific_input.RedirectPaymentProduct11SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct11SpecificInput__first_installment_payment_date': typing.Optional[datetime.date]}
property first_installment_payment_date: date | None
The first installment date must be given in the YYYYMMDD format.

Type: date

from_dictionary(dictionary: dict) RedirectPaymentProduct11SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product3203_specific_input.RedirectPaymentProduct3203SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct3203SpecificInput__checkout_type': typing.Optional[str]}
property checkout_type: str | None
Determines the type of the checkout that will be used for PostFinancePay. Allowed values:
  • default - The user will be redirected to the PostFinancePay application to complete the payment.

  • expressCheckout - In order to accelerate the payment process, the shipping and billing addresses are requested from the payer’s PostFinancePay account. These will be returned in the API response in paymentProduct3203SpecificOutput. Note that the payer must accept to provide his billing and shipping address during checkout in the PostFinancePay application. If not, the payment will be declined.

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct3203SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product3204_specific_input.RedirectPaymentProduct3204SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct3204SpecificInput__alias_label': typing.Optional[str], '_RedirectPaymentProduct3204SpecificInput__blik_code': typing.Optional[str]}
property alias_label: str | None
A name that will allow the consumer to identify his/her account in the your web shop (e.g., a masked email address or customer number) after he/she accepts the tokenization in his banking app. The label is especially important if the User has more than one account in the same web shop. This field is mandatory in tokenization use cases.

Type: str

property blik_code: str | None
Code required for BLIK payments generated by the buyer’s bank application

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct3204SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product3302_specific_input.RedirectPaymentProduct3302SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct3302SpecificInput__organization_entity_type': typing.Optional[str], '_RedirectPaymentProduct3302SpecificInput__organization_registration_id': typing.Optional[str], '_RedirectPaymentProduct3302SpecificInput__vat_id': typing.Optional[str]}
from_dictionary(dictionary: dict) RedirectPaymentProduct3302SpecificInput[source]
property organization_entity_type: str | None
This parameter defines the legal form of a business and is mandatory in B2B transactions, Accurate classification ensures compliance and optimized payment handling.

Type: str

property organization_registration_id: str | None
Unique identifier given by relevant authority verifying a business’s legal registration. Mandatory in B2B transactions

Type: str

to_dictionary() dict[source]
property vat_id: str | None
Tax identification number used to validate a business’s VAT compliance. Mandatory in B2B transactions

Type: str

class onlinepayments.sdk.domain.redirect_payment_product3306_specific_input.RedirectPaymentProduct3306SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct3306SpecificInput__extra_merchant_data': typing.Optional[str]}
property extra_merchant_data: str | None
In some cases, Klarna require additional information regarding the customer and the purchase in order to make a correct risk assessment. This information, called extra merchant data (EMD), may consist of data about the customer performing the transaction, the product/services associated with the transaction, or the seller and their affiliates.

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct3306SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product3307_specific_input.RedirectPaymentProduct3307SpecificInput[source]

Bases: DataObject

__annotations__ = {}
from_dictionary(dictionary: dict) RedirectPaymentProduct3307SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5001_specific_input.RedirectPaymentProduct5001SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5001SpecificInput__exemption_request': typing.Optional[str], '_RedirectPaymentProduct5001SpecificInput__subsequent_type': typing.Optional[str]}
property exemption_request: str | None
In PSD2, the ExemptionRequest field is used by merchants requesting an exemption when not using authentication on a transaction, in order to keep the conversion up. This field indicates the reason for the authentication exemption request. Allowed values:
  • low-value - The transaction amount is below the 30€, with a maximum of 5 transactions or €100 accumulated per customer.

  • transaction-risk-analysis - The transaction has been assessed as low risk by the merchant’s fraud prevention system.

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct5001SpecificInput[source]
property subsequent_type: str | None
Determines the type of the subsequent that will be used. Allowed values:
  • recurring - Transactions processed at fixed, regular intervals not to exceed one year between Transactions, representing an agreement between a consumer and a merchant to purchase goods or services provided over a period of time. Note that a recurring MIT transaction is initiated by the merchant (payee) not the customer (payer) and so is out of scope of PSD2. Recurring transactions that are in scope of PSD2 (and therefore may benefit from the recurring transaction exemption) are those that are customer (payer) initiates, e.g. standing orders set up from a bank account.

  • installment - Installment payments describe a single purchase of goods or services billed to a consumer in multiple transactions over a period of time agreed by the consumer and merchant.

  • other - other cases

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5300_specific_input.RedirectPaymentProduct5300SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5300SpecificInput__birth_city': typing.Optional[str], '_RedirectPaymentProduct5300SpecificInput__birth_country': typing.Optional[str], '_RedirectPaymentProduct5300SpecificInput__birth_zip_code': typing.Optional[str], '_RedirectPaymentProduct5300SpecificInput__channel': typing.Optional[str], '_RedirectPaymentProduct5300SpecificInput__loyalty_card_number': typing.Optional[str], '_RedirectPaymentProduct5300SpecificInput__second_installment_payment_date': typing.Optional[str], '_RedirectPaymentProduct5300SpecificInput__session_duration': typing.Optional[int], '_RedirectPaymentProduct5300SpecificInput__title': typing.Optional[str]}
property birth_city: str | None
The city of the address where the customer was born

Type: str

property birth_country: str | None
ISO 3166-1 alpha-2 country code of the address where the customer was born

Type: str

property birth_zip_code: str | None
The zip code of the address where the customer was born

Type: str

property channel: str | None
The channel used by the customer

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct5300SpecificInput[source]
property loyalty_card_number: str | None
The number of customer’s loyalty card or program

Type: str

property second_installment_payment_date: str | None
The date of the second installment (YYYYMMDD)

Type: str

property session_duration: int | None
The duration of the session in seconds

Type: int

property title: str | None
Descriptive text that is used towards the customer, either during an online checkout at a third party or on the customer’s statement.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5402_specific_input.RedirectPaymentProduct5402SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5402SpecificInput__complete_remaining_payment_amount': typing.Optional[bool]}
property complete_remaining_payment_amount: bool | None
Determines how the remaining payment amount is handled if the initial payment is insufficient.
  • true: The payment process will continue on our side, allowing the customer to pay the outstanding amount using a different payment method.

  • false: Merchant must create and process a separate payment for the remaining amount independently.

Type: bool

from_dictionary(dictionary: dict) RedirectPaymentProduct5402SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5403_specific_input.RedirectPaymentProduct5403SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5403SpecificInput__complete_remaining_payment_amount': typing.Optional[bool]}
property complete_remaining_payment_amount: bool | None
Determines how the remaining payment amount is handled if the initial payment is insufficient.
  • true: The payment process will continue on our side, allowing the customer to pay the outstanding amount using a different payment method.

  • false: Merchant must create and process a separate payment for the remaining amount independently.

Type: bool

from_dictionary(dictionary: dict) RedirectPaymentProduct5403SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5406_specific_input.RedirectPaymentProduct5406SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5406SpecificInput__customer_bank_account': typing.Optional[onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount]}
property customer_bank_account: CustomerBankAccount | None
Data of customer bank account

Type: onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount

from_dictionary(dictionary: dict) RedirectPaymentProduct5406SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5408_specific_input.RedirectPaymentProduct5408SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5408SpecificInput__customer_bank_account': typing.Optional[onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount], '_RedirectPaymentProduct5408SpecificInput__instant_payment_only': typing.Optional[bool]}
property customer_bank_account: CustomerBankAccount | None
Data of customer bank account

Type: onlinepayments.sdk.domain.customer_bank_account.CustomerBankAccount

from_dictionary(dictionary: dict) RedirectPaymentProduct5408SpecificInput[source]
property instant_payment_only: bool | None
  • true - consumer can only use instant payment for Account to Account Bank transfer payments

  • false - consumer can only use standard payment for Account to Account Bank transfer payments

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5410_specific_input.RedirectPaymentProduct5410SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5410SpecificInput__second_installment_payment_date': typing.Optional[datetime.date]}
from_dictionary(dictionary: dict) RedirectPaymentProduct5410SpecificInput[source]
property second_installment_payment_date: date | None
The date of the second installment (YYYYMMDD)

Type: date

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product5412_specific_input.RedirectPaymentProduct5412SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct5412SpecificInput__adjustable_amount': typing.Optional[bool], '_RedirectPaymentProduct5412SpecificInput__beneficiary_id': typing.Optional[str]}
property adjustable_amount: bool | None
If true, the customer can adjust the portion of the total amount paid using this payment method in the ANCV app at authentication time.

Type: bool

property beneficiary_id: str | None
The 11 digits CV Connect ID of the customer. If this ID is not provided, the customer’s e-mail address will be used, if available. The customer will be able to confirm their ID before proceeding with payment.

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct5412SpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product809_specific_input.RedirectPaymentProduct809SpecificInput[source]

Bases: DataObject

Deprecated; Deprecated, this is no longer used.

__annotations__ = {'_RedirectPaymentProduct809SpecificInput__issuer_id': typing.Optional[str]}
from_dictionary(dictionary: dict) RedirectPaymentProduct809SpecificInput[source]
property issuer_id: str | None
Deprecated. Unique ID of the issuing bank of the customer

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirect_payment_product840_specific_input.RedirectPaymentProduct840SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RedirectPaymentProduct840SpecificInput__address_selection_at_pay_pal': typing.Optional[bool], '_RedirectPaymentProduct840SpecificInput__custom': typing.Optional[str], '_RedirectPaymentProduct840SpecificInput__java_script_sdk_flow': typing.Optional[bool], '_RedirectPaymentProduct840SpecificInput__pay_later': typing.Optional[bool]}
property address_selection_at_pay_pal: bool | None
Indicates whether to use PayPal Express Checkout Shortcut.
  • true = When shortcut is enabled, the consumer can select a shipping address during PayPal checkout.

  • false = When shortcut is disabled, the consumer cannot change the shipping address. Default value is false. Please note that this field is ignored when order.additionalInput.typeInformation.purchaseType is set to “digital”

Type: bool

property custom: str | None
Free text field that you can use to support reconciliation flow.

Type: str

from_dictionary(dictionary: dict) RedirectPaymentProduct840SpecificInput[source]
property java_script_sdk_flow: bool | None
To be enabled when Javascript SDK integration is implemented on S2S flow
  • false = When this flag is disabled the field RedirectionURL is returned by CreatePayment call and should be used in merchant implementation to redirect buyer to PayPal.

  • true = When this flag is enabled the field orderID is returned by CreatePayment call and should be utilized in case merchant has integrated JS SDK button on their S2S implementation Default value is false.

Type: bool

property pay_later: bool | None
Indicates whether to allow PayPal Pay Later option.
  • true = When option is enabled, the consumer can select the PayPal PayLater button given that the merchant meets the eligibility criteria from PayPal.

  • false = When option is disabled, the consumer cannot select the PayPal PayLater button. Default value is true.

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.redirection_data.RedirectionData[source]

Bases: DataObject

__annotations__ = {'_RedirectionData__return_url': typing.Optional[str]}
from_dictionary(dictionary: dict) RedirectionData[source]
property return_url: str | None
The URL that the customer is redirected to after the payment flow has finished. You can add any number of key value pairs in the query string that, for instance help you to identify the customer when they return to your site. Please note that we will also append some additional key value pairs that will also help you with this identification process. Note: The provided URL should be absolute and contain the protocol to use, e.g. http:// or https://. For use on mobile devices a custom protocol can be used in the form of protocol://. This protocol must be registered on the device first. URLs without a protocol will be rejected.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_card_method_specific_output.RefundCardMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_RefundCardMethodSpecificOutput__currency_conversion': typing.Optional[onlinepayments.sdk.domain.currency_conversion.CurrencyConversion], '_RefundCardMethodSpecificOutput__total_amount_paid': typing.Optional[int], '_RefundCardMethodSpecificOutput__total_amount_refunded': typing.Optional[int]}
property currency_conversion: CurrencyConversion | None

Type: onlinepayments.sdk.domain.currency_conversion.CurrencyConversion

from_dictionary(dictionary: dict) RefundCardMethodSpecificOutput[source]
to_dictionary() dict[source]
property total_amount_paid: int | None

Type: int

property total_amount_refunded: int | None

Type: int

class onlinepayments.sdk.domain.refund_e_wallet_method_specific_output.RefundEWalletMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_RefundEWalletMethodSpecificOutput__payment_product840_specific_output': typing.Optional[onlinepayments.sdk.domain.refund_payment_product840_specific_output.RefundPaymentProduct840SpecificOutput], '_RefundEWalletMethodSpecificOutput__total_amount_paid': typing.Optional[int], '_RefundEWalletMethodSpecificOutput__total_amount_refunded': typing.Optional[int]}
from_dictionary(dictionary: dict) RefundEWalletMethodSpecificOutput[source]
property payment_product840_specific_output: RefundPaymentProduct840SpecificOutput | None

Type: onlinepayments.sdk.domain.refund_payment_product840_specific_output.RefundPaymentProduct840SpecificOutput

to_dictionary() dict[source]
property total_amount_paid: int | None

Type: int

property total_amount_refunded: int | None

Type: int

class onlinepayments.sdk.domain.refund_error_response.RefundErrorResponse[source]

Bases: DataObject

__annotations__ = {'_RefundErrorResponse__error_id': typing.Optional[str], '_RefundErrorResponse__errors': typing.Optional[typing.List[onlinepayments.sdk.domain.api_error.APIError]], '_RefundErrorResponse__refund_result': typing.Optional[onlinepayments.sdk.domain.refund_response.RefundResponse]}
property error_id: str | None

Type: str

property errors: List[APIError] | None

Type: list[onlinepayments.sdk.domain.api_error.APIError]

from_dictionary(dictionary: dict) RefundErrorResponse[source]
property refund_result: RefundResponse | None
This object has the numeric representation of the current refund status, timestamp of last status change and performable action on the current refund resource. In case of a rejected refund, detailed error information is listed.

Type: onlinepayments.sdk.domain.refund_response.RefundResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_mobile_method_specific_output.RefundMobileMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_RefundMobileMethodSpecificOutput__network': typing.Optional[str], '_RefundMobileMethodSpecificOutput__total_amount_paid': typing.Optional[int], '_RefundMobileMethodSpecificOutput__total_amount_refunded': typing.Optional[int]}
from_dictionary(dictionary: dict) RefundMobileMethodSpecificOutput[source]
property network: str | None
The card network that was used for a mobile payment method operation

Type: str

to_dictionary() dict[source]
property total_amount_paid: int | None

Type: int

property total_amount_refunded: int | None

Type: int

class onlinepayments.sdk.domain.refund_output.RefundOutput[source]

Bases: DataObject

__annotations__ = {'_RefundOutput__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_RefundOutput__amount_paid': typing.Optional[int], '_RefundOutput__card_refund_method_specific_output': typing.Optional[onlinepayments.sdk.domain.refund_card_method_specific_output.RefundCardMethodSpecificOutput], '_RefundOutput__e_wallet_refund_method_specific_output': typing.Optional[onlinepayments.sdk.domain.refund_e_wallet_method_specific_output.RefundEWalletMethodSpecificOutput], '_RefundOutput__merchant_parameters': typing.Optional[str], '_RefundOutput__mobile_refund_method_specific_output': typing.Optional[onlinepayments.sdk.domain.refund_mobile_method_specific_output.RefundMobileMethodSpecificOutput], '_RefundOutput__operation_references': typing.Optional[onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences], '_RefundOutput__payment_method': typing.Optional[str], '_RefundOutput__redirect_refund_method_specific_output': typing.Optional[onlinepayments.sdk.domain.refund_redirect_method_specific_output.RefundRedirectMethodSpecificOutput], '_RefundOutput__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property amount_paid: int | None

Type: int

property card_refund_method_specific_output: RefundCardMethodSpecificOutput | None

Type: onlinepayments.sdk.domain.refund_card_method_specific_output.RefundCardMethodSpecificOutput

property e_wallet_refund_method_specific_output: RefundEWalletMethodSpecificOutput | None

Type: onlinepayments.sdk.domain.refund_e_wallet_method_specific_output.RefundEWalletMethodSpecificOutput

from_dictionary(dictionary: dict) RefundOutput[source]
property merchant_parameters: str | None
It allows you to store additional parameters for the transaction in the format you prefer (e.g.-> key-value query string, JSON, etc.) These parameters are then echoed back to you in API GET calls and Webhook notifications. This field must not contain any personal data.

Type: str

property mobile_refund_method_specific_output: RefundMobileMethodSpecificOutput | None

Type: onlinepayments.sdk.domain.refund_mobile_method_specific_output.RefundMobileMethodSpecificOutput

property operation_references: OperationPaymentReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences

property payment_method: str | None
Payment method identifier used by the our payment engine.

Type: str

property redirect_refund_method_specific_output: RefundRedirectMethodSpecificOutput | None

Type: onlinepayments.sdk.domain.refund_redirect_method_specific_output.RefundRedirectMethodSpecificOutput

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_payment_product840_customer_account.RefundPaymentProduct840CustomerAccount[source]

Bases: DataObject

__annotations__ = {'_RefundPaymentProduct840CustomerAccount__customer_account_status': typing.Optional[str], '_RefundPaymentProduct840CustomerAccount__customer_address_status': typing.Optional[str], '_RefundPaymentProduct840CustomerAccount__payer_id': typing.Optional[str]}
property customer_account_status: str | None

Type: str

property customer_address_status: str | None

Type: str

from_dictionary(dictionary: dict) RefundPaymentProduct840CustomerAccount[source]
property payer_id: str | None
The unique identifier of a PayPal account and will never change in the life cycle of a PayPal account

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_payment_product840_specific_output.RefundPaymentProduct840SpecificOutput[source]

Bases: DataObject

__annotations__ = {'_RefundPaymentProduct840SpecificOutput__customer_account': typing.Optional[onlinepayments.sdk.domain.refund_payment_product840_customer_account.RefundPaymentProduct840CustomerAccount]}
property customer_account: RefundPaymentProduct840CustomerAccount | None

Type: onlinepayments.sdk.domain.refund_payment_product840_customer_account.RefundPaymentProduct840CustomerAccount

from_dictionary(dictionary: dict) RefundPaymentProduct840SpecificOutput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_redirect_method_specific_output.RefundRedirectMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_RefundRedirectMethodSpecificOutput__total_amount_paid': typing.Optional[int], '_RefundRedirectMethodSpecificOutput__total_amount_refunded': typing.Optional[int]}
from_dictionary(dictionary: dict) RefundRedirectMethodSpecificOutput[source]
to_dictionary() dict[source]
property total_amount_paid: int | None

Type: int

property total_amount_refunded: int | None

Type: int

class onlinepayments.sdk.domain.refund_redirect_payment_method_specific_input.RefundRedirectPaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_RefundRedirectPaymentMethodSpecificInput__refund_redirect_payment_product900_specific_input': typing.Optional[onlinepayments.sdk.domain.refund_redirect_payment_product900_specific_input.RefundRedirectPaymentProduct900SpecificInput]}
from_dictionary(dictionary: dict) RefundRedirectPaymentMethodSpecificInput[source]
property refund_redirect_payment_product900_specific_input: RefundRedirectPaymentProduct900SpecificInput | None
Object containing specific input required for Wero refunds (Payment product ID 900).

Type: onlinepayments.sdk.domain.refund_redirect_payment_product900_specific_input.RefundRedirectPaymentProduct900SpecificInput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_redirect_payment_product900_specific_input.RefundRedirectPaymentProduct900SpecificInput[source]

Bases: DataObject

__annotations__ = {'_RefundRedirectPaymentProduct900SpecificInput__refund_reason': typing.Optional[str]}
from_dictionary(dictionary: dict) RefundRedirectPaymentProduct900SpecificInput[source]
property refund_reason: str | None
The reason for the refund, required for Wero payments. This value is sent to the consumer’s bank as part of the Wero refund request and will be shown to the consumer in their banking application. If not provided, the value defaults to “Other”.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_request.RefundRequest[source]

Bases: DataObject

__annotations__ = {'_RefundRequest__amount_of_money': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_RefundRequest__capture_id': typing.Optional[str], '_RefundRequest__omnichannel_refund_specific_input': typing.Optional[onlinepayments.sdk.domain.omnichannel_refund_specific_input.OmnichannelRefundSpecificInput], '_RefundRequest__operation_references': typing.Optional[onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences], '_RefundRequest__reason': typing.Optional[str], '_RefundRequest__references': typing.Optional[onlinepayments.sdk.domain.payment_references.PaymentReferences], '_RefundRequest__refund_redirect_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.refund_redirect_payment_method_specific_input.RefundRedirectPaymentMethodSpecificInput]}
property amount_of_money: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property capture_id: str | None
The identifier of the capture that is used for partial refund. CaptureId is only necessary for Paypal/PostfinancePay multi-capture payments.

Type: str

from_dictionary(dictionary: dict) RefundRequest[source]
property omnichannel_refund_specific_input: OmnichannelRefundSpecificInput | None
Object containing the additional refund details for an Omnichannel merchant

Type: onlinepayments.sdk.domain.omnichannel_refund_specific_input.OmnichannelRefundSpecificInput

property operation_references: OperationPaymentReferences | None
Object that holds all reference properties that are linked to this transaction

Type: onlinepayments.sdk.domain.operation_payment_references.OperationPaymentReferences

property reason: str | None
The reason for the refund. This will be available in our portal and reports for your information only. It will NOT appear in the consumer bank statement or yours.§

Type: str

property references: PaymentReferences | None
Object that holds all reference properties that are linked to this transaction. Deprecated for capture/refund: Use operationReferences instead.

Type: onlinepayments.sdk.domain.payment_references.PaymentReferences

property refund_redirect_payment_method_specific_input: RefundRedirectPaymentMethodSpecificInput | None
Object containing the specific input details for refunds for redirection payment methods.

Type: onlinepayments.sdk.domain.refund_redirect_payment_method_specific_input.RefundRedirectPaymentMethodSpecificInput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refund_response.RefundResponse[source]

Bases: DataObject

__annotations__ = {'_RefundResponse__id': typing.Optional[str], '_RefundResponse__refund_output': typing.Optional[onlinepayments.sdk.domain.refund_output.RefundOutput], '_RefundResponse__status': typing.Optional[str], '_RefundResponse__status_output': typing.Optional[onlinepayments.sdk.domain.order_status_output.OrderStatusOutput]}
from_dictionary(dictionary: dict) RefundResponse[source]
property id: str | None
This is our unique payment transaction identifier.

Type: str

property refund_output: RefundOutput | None
Object containing refund details

Type: onlinepayments.sdk.domain.refund_output.RefundOutput

property status: str | None
Current high-level status of the payment in a human-readable form.

Type: str

property status_output: OrderStatusOutput | None

Type: onlinepayments.sdk.domain.order_status_output.OrderStatusOutput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.refunds_response.RefundsResponse[source]

Bases: DataObject

__annotations__ = {'_RefundsResponse__refunds': typing.Optional[typing.List[onlinepayments.sdk.domain.refund_response.RefundResponse]]}
from_dictionary(dictionary: dict) RefundsResponse[source]
property refunds: List[RefundResponse] | None
The list of all refunds performed on the requested payment.

Type: list[onlinepayments.sdk.domain.refund_response.RefundResponse]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.regular_expression_validator.RegularExpressionValidator[source]

Bases: DataObject

__annotations__ = {'_RegularExpressionValidator__regular_expression': typing.Optional[str]}
from_dictionary(dictionary: dict) RegularExpressionValidator[source]
property regular_expression: str | None

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.revoke_mandate_request.RevokeMandateRequest[source]

Bases: DataObject

__annotations__ = {'_RevokeMandateRequest__revocation_reason': typing.Optional[str]}
from_dictionary(dictionary: dict) RevokeMandateRequest[source]
property revocation_reason: str | None
The reason for revoking the mandate. Possible values are:
  • receivedFinal

  • userAction

  • obsolescence

  • refused

  • revocationAskedByDebitor

  • revocationAskedByCreditor

  • deletionAskedByDebitor

  • deletionAskedByCreditor

Refer to the support page to determine if the property is applicable.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.send_test_request.SendTestRequest[source]

Bases: DataObject

__annotations__ = {'_SendTestRequest__url': typing.Optional[str]}
from_dictionary(dictionary: dict) SendTestRequest[source]
to_dictionary() dict[source]
property url: str | None
Url to which the dummy webhook would be sent. If the parameter is not sent, It will be sent as default to the webhook url configured in the backoffice.

Type: str

class onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_input.SepaDirectDebitPaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_SepaDirectDebitPaymentMethodSpecificInput__payment_product771_specific_input': typing.Optional[onlinepayments.sdk.domain.sepa_direct_debit_payment_product771_specific_input.SepaDirectDebitPaymentProduct771SpecificInput], '_SepaDirectDebitPaymentMethodSpecificInput__payment_product_id': typing.Optional[int]}
from_dictionary(dictionary: dict) SepaDirectDebitPaymentMethodSpecificInput[source]
property payment_product771_specific_input: SepaDirectDebitPaymentProduct771SpecificInput | None
Object containing information specific to SEPA Direct Debit

Type: onlinepayments.sdk.domain.sepa_direct_debit_payment_product771_specific_input.SepaDirectDebitPaymentProduct771SpecificInput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_input_base.SepaDirectDebitPaymentMethodSpecificInputBase[source]

Bases: DataObject

__annotations__ = {'_SepaDirectDebitPaymentMethodSpecificInputBase__payment_product771_specific_input': typing.Optional[onlinepayments.sdk.domain.sepa_direct_debit_payment_product771_specific_input_base.SepaDirectDebitPaymentProduct771SpecificInputBase], '_SepaDirectDebitPaymentMethodSpecificInputBase__payment_product_id': typing.Optional[int]}
from_dictionary(dictionary: dict) SepaDirectDebitPaymentMethodSpecificInputBase[source]
property payment_product771_specific_input: SepaDirectDebitPaymentProduct771SpecificInputBase | None
Object containing information specific to SEPA Direct Debit

Type: onlinepayments.sdk.domain.sepa_direct_debit_payment_product771_specific_input_base.SepaDirectDebitPaymentProduct771SpecificInputBase

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.sepa_direct_debit_payment_method_specific_output.SepaDirectDebitPaymentMethodSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_SepaDirectDebitPaymentMethodSpecificOutput__fraud_results': typing.Optional[onlinepayments.sdk.domain.fraud_results.FraudResults], '_SepaDirectDebitPaymentMethodSpecificOutput__payment_product771_specific_output': typing.Optional[onlinepayments.sdk.domain.payment_product771_specific_output.PaymentProduct771SpecificOutput], '_SepaDirectDebitPaymentMethodSpecificOutput__payment_product_id': typing.Optional[int]}
property fraud_results: FraudResults | None
Object containing the results of the fraud screening

Type: onlinepayments.sdk.domain.fraud_results.FraudResults

from_dictionary(dictionary: dict) SepaDirectDebitPaymentMethodSpecificOutput[source]
property payment_product771_specific_output: PaymentProduct771SpecificOutput | None
Output that is SEPA Direct Debit specific (i.e. the used mandate)

Type: onlinepayments.sdk.domain.payment_product771_specific_output.PaymentProduct771SpecificOutput

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.sepa_direct_debit_payment_product771_specific_input.SepaDirectDebitPaymentProduct771SpecificInput[source]

Bases: DataObject

__annotations__ = {'_SepaDirectDebitPaymentProduct771SpecificInput__existing_unique_mandate_reference': typing.Optional[str], '_SepaDirectDebitPaymentProduct771SpecificInput__mandate': typing.Optional[onlinepayments.sdk.domain.create_mandate_with_return_url.CreateMandateWithReturnUrl]}
property existing_unique_mandate_reference: str | None
The unique reference of the existing mandate to use in this payment.

Type: str

from_dictionary(dictionary: dict) SepaDirectDebitPaymentProduct771SpecificInput[source]
property mandate: CreateMandateWithReturnUrl | None
Object containing information to create a SEPA Direct Debit mandate.

Type: onlinepayments.sdk.domain.create_mandate_with_return_url.CreateMandateWithReturnUrl

to_dictionary() dict[source]
class onlinepayments.sdk.domain.sepa_direct_debit_payment_product771_specific_input_base.SepaDirectDebitPaymentProduct771SpecificInputBase[source]

Bases: DataObject

__annotations__ = {'_SepaDirectDebitPaymentProduct771SpecificInputBase__existing_unique_mandate_reference': typing.Optional[str], '_SepaDirectDebitPaymentProduct771SpecificInputBase__mandate': typing.Optional[onlinepayments.sdk.domain.create_mandate_request.CreateMandateRequest]}
property existing_unique_mandate_reference: str | None
The unique reference of the existing mandate to use in this payment.

Type: str

from_dictionary(dictionary: dict) SepaDirectDebitPaymentProduct771SpecificInputBase[source]
property mandate: CreateMandateRequest | None
Object containing information to create a SEPA Direct Debit mandate.

Type: onlinepayments.sdk.domain.create_mandate_request.CreateMandateRequest

to_dictionary() dict[source]
class onlinepayments.sdk.domain.session_details.SessionDetails[source]

Bases: DataObject

__annotations__ = {'_SessionDetails__id': typing.Optional[str], '_SessionDetails__type': typing.Optional[str]}
from_dictionary(dictionary: dict) SessionDetails[source]
property id: str | None
Session identifier from where this payment originates from. Depends on the session type: ex: For PayByLink: id is the corresponding paymentLinkId.

Type: str

to_dictionary() dict[source]
property type: str | None
Session type. This denotes the origin of the session. For example PayByLink, HostedTokenization, etc.

Type: str

class onlinepayments.sdk.domain.session_request.SessionRequest[source]

Bases: DataObject

__annotations__ = {'_SessionRequest__tokens': typing.Optional[typing.List[str]]}
from_dictionary(dictionary: dict) SessionRequest[source]
to_dictionary() dict[source]
property tokens: List[str] | None
List of previously stored tokens linked to the customer that wants to checkout.

Type: list[str]

class onlinepayments.sdk.domain.session_response.SessionResponse[source]

Bases: DataObject

__annotations__ = {'_SessionResponse__asset_url': typing.Optional[str], '_SessionResponse__client_api_url': typing.Optional[str], '_SessionResponse__client_session_id': typing.Optional[str], '_SessionResponse__customer_id': typing.Optional[str], '_SessionResponse__invalid_tokens': typing.Optional[typing.List[str]]}
property asset_url: str | None
The datacenter-specific base url for assets. This value needs to be passed to the Client SDK to make sure that the client software connects to the right datacenter.

Type: str

property client_api_url: str | None
The datacenter-specific base url for client requests. This value needs to be passed to the Client SDK to make sure that the client software connects to the right datacenter.

Type: str

property client_session_id: str | None
The identifier of the session that has been created.

Type: str

property customer_id: str | None
The session is built up around the customer in the form of the customerId. All client APIs use this customerId in the URI to identify the customer.

Type: str

from_dictionary(dictionary: dict) SessionResponse[source]
property invalid_tokens: List[str] | None

Type: list[str]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.shipping.Shipping[source]

Bases: DataObject

__annotations__ = {'_Shipping__address': typing.Optional[onlinepayments.sdk.domain.address_personal.AddressPersonal], '_Shipping__address_indicator': typing.Optional[str], '_Shipping__email_address': typing.Optional[str], '_Shipping__first_usage_date': typing.Optional[str], '_Shipping__is_first_usage': typing.Optional[bool], '_Shipping__method': typing.Optional[onlinepayments.sdk.domain.shipping_method.ShippingMethod], '_Shipping__shipping_cost': typing.Optional[int], '_Shipping__shipping_cost_tax': typing.Optional[int], '_Shipping__type': typing.Optional[str]}
property address: AddressPersonal | None
Object containing address information

Type: onlinepayments.sdk.domain.address_personal.AddressPersonal

property address_indicator: str | None
Indicates shipping method chosen for the transaction. Possible values:
  • same-as-billing = the shipping address is the same as the billing address

  • another-verified-address-on-file-with-merchant = the address used for shipping is another verified address of the customer that is on file with you

  • different-than-billing = shipping address is different from the billing address

  • ship-to-store = goods are shipped to a store (shipping address = store address)

  • digital-goods = electronic delivery of digital goods

  • travel-and-event-tickets-not-shipped = travel and/or event tickets that are not shipped

  • other = other means of delivery

Type: str

property email_address: str | None
Email address linked to the shipping

Type: str

property first_usage_date: str | None
Date (YYYYMMDD) when the shipping details for this transaction were first used.

Type: str

from_dictionary(dictionary: dict) Shipping[source]
property is_first_usage: bool | None
Indicator if this shipping address is used for the first time to ship an order

true = the shipping details are used for the first time with this transaction

false = the shipping details have been used for other transactions in the past

Type: bool

property method: ShippingMethod | None
Object containing information regarding shipping method

Type: onlinepayments.sdk.domain.shipping_method.ShippingMethod

property shipping_cost: int | None
Cost associated with the shipping of the order.

Type: int

property shipping_cost_tax: int | None
Tax amount of the shipping cost.

Type: int

to_dictionary() dict[source]
property type: str | None
Indicates the merchandise delivery timeframe. Possible values:
  • electronic = For electronic delivery (services or digital goods)

  • same-day = For same day deliveries

  • overnight = For overnight deliveries

  • 2-day-or-more = For two day or more delivery time

Type: str

class onlinepayments.sdk.domain.shipping_method.ShippingMethod[source]

Bases: DataObject

__annotations__ = {'_ShippingMethod__details': typing.Optional[str], '_ShippingMethod__name': typing.Optional[str], '_ShippingMethod__speed': typing.Optional[int], '_ShippingMethod__type': typing.Optional[str]}
property details: str | None
Details about the shipping method

Type: str

from_dictionary(dictionary: dict) ShippingMethod[source]
property name: str | None
Name of the shipping method

Type: str

property speed: int | None
Number of hours to delivery

Type: int

to_dictionary() dict[source]
property type: str | None
Shipping method type

Type: str

class onlinepayments.sdk.domain.shopping_cart.ShoppingCart[source]

Bases: DataObject

__annotations__ = {'_ShoppingCart__amount_breakdown': typing.Optional[typing.List[onlinepayments.sdk.domain.amount_breakdown.AmountBreakdown]], '_ShoppingCart__gift_card_purchase': typing.Optional[onlinepayments.sdk.domain.gift_card_purchase.GiftCardPurchase], '_ShoppingCart__is_pre_order': typing.Optional[bool], '_ShoppingCart__items': typing.Optional[typing.List[onlinepayments.sdk.domain.line_item.LineItem]], '_ShoppingCart__pre_order_item_availability_date': typing.Optional[str], '_ShoppingCart__re_order_indicator': typing.Optional[bool]}
property amount_breakdown: List[AmountBreakdown] | None
Deprecated: Use order.shipping.shippingCost for shipping cost. Other amounts are not used. Determines how the total amount is split into amount types

Type: list[onlinepayments.sdk.domain.amount_breakdown.AmountBreakdown]

Deprecated; Use order.shipping.shippingCost for shipping cost. Other amounts are not used. Determines how the total amount is split into amount types

from_dictionary(dictionary: dict) ShoppingCart[source]
property gift_card_purchase: GiftCardPurchase | None
Object containing information on purchased gift card(s)

Type: onlinepayments.sdk.domain.gift_card_purchase.GiftCardPurchase

property is_pre_order: bool | None
The customer is pre-ordering one or more items

Type: bool

property items: List[LineItem] | None
Shopping cart data

Type: list[onlinepayments.sdk.domain.line_item.LineItem]

property pre_order_item_availability_date: str | None
Date (YYYYMMDD) when the preordered item becomes available

Type: str

property re_order_indicator: bool | None
Indicates whether the cardholder is reordering previously purchased item(s)

true = the customer is re-ordering at least one of the items again

false = this is the first time the customer is ordering these items

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.show_form_data.ShowFormData[source]

Bases: DataObject

__annotations__ = {'_ShowFormData__payment_product3012': typing.Optional[onlinepayments.sdk.domain.payment_product3012.PaymentProduct3012], '_ShowFormData__payment_product350': typing.Optional[onlinepayments.sdk.domain.payment_product350.PaymentProduct350], '_ShowFormData__payment_product5001': typing.Optional[onlinepayments.sdk.domain.payment_product5001.PaymentProduct5001], '_ShowFormData__payment_product5404': typing.Optional[onlinepayments.sdk.domain.payment_product5404.PaymentProduct5404], '_ShowFormData__payment_product5407': typing.Optional[onlinepayments.sdk.domain.payment_product5407.PaymentProduct5407], '_ShowFormData__pending_authentication': typing.Optional[onlinepayments.sdk.domain.pending_authentication.PendingAuthentication]}
from_dictionary(dictionary: dict) ShowFormData[source]
property payment_product3012: PaymentProduct3012 | None
Contains the third party data for payment product 3012 (Bancontact)

Type: onlinepayments.sdk.domain.payment_product3012.PaymentProduct3012

property payment_product350: PaymentProduct350 | None
Contains the third party data for payment product 350 (Swish)

Type: onlinepayments.sdk.domain.payment_product350.PaymentProduct350

property payment_product5001: PaymentProduct5001 | None
Deprecated by pendingAuthentication. Contains the third party data for payment product 5001 (Bizum)

Type: onlinepayments.sdk.domain.payment_product5001.PaymentProduct5001

property payment_product5404: PaymentProduct5404 | None
Contains the third party data for payment product 5404 (WeChat Pay)

Type: onlinepayments.sdk.domain.payment_product5404.PaymentProduct5404

property payment_product5407: PaymentProduct5407 | None
Contains the third party data for payment product 5407 (Twint)

Type: onlinepayments.sdk.domain.payment_product5407.PaymentProduct5407

property pending_authentication: PendingAuthentication | None
Contains the third party data for payment product requiring an external authentication (e.g., Bizum, CV Connect)

Type: onlinepayments.sdk.domain.pending_authentication.PendingAuthentication

to_dictionary() dict[source]
class onlinepayments.sdk.domain.show_instructions_data.ShowInstructionsData[source]

Bases: DataObject

__annotations__ = {'_ShowInstructionsData__show_data': typing.Optional[str]}
from_dictionary(dictionary: dict) ShowInstructionsData[source]
property show_data: str | None
The data that should be shown to the customer that can be used to render the instructions in your own application or website.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.split_payment_product_filter.SplitPaymentProductFilter[source]

Bases: DataObject

__annotations__ = {'_SplitPaymentProductFilter__products': typing.Optional[typing.List[int]]}
from_dictionary(dictionary: dict) SplitPaymentProductFilter[source]
property products: List[int] | None

Type: list[int]

to_dictionary() dict[source]
class onlinepayments.sdk.domain.split_payment_product_filters_hosted_checkout.SplitPaymentProductFiltersHostedCheckout[source]

Bases: DataObject

__annotations__ = {'_SplitPaymentProductFiltersHostedCheckout__exclude': typing.Optional[onlinepayments.sdk.domain.split_payment_product_filter.SplitPaymentProductFilter], '_SplitPaymentProductFiltersHostedCheckout__restrict_to': typing.Optional[onlinepayments.sdk.domain.split_payment_product_filter.SplitPaymentProductFilter]}
property exclude: SplitPaymentProductFilter | None
The payment product IDs to be excluded or restricted for the payment products available for the following payments in a split payment. Note that you can add exclusions on top of the ‘restrictTo’ filter.

Type: onlinepayments.sdk.domain.split_payment_product_filter.SplitPaymentProductFilter

from_dictionary(dictionary: dict) SplitPaymentProductFiltersHostedCheckout[source]
property restrict_to: SplitPaymentProductFilter | None
The payment product IDs to be excluded or restricted for the payment products available for the following payments in a split payment. Note that you can add exclusions on top of the ‘restrictTo’ filter.

Type: onlinepayments.sdk.domain.split_payment_product_filter.SplitPaymentProductFilter

to_dictionary() dict[source]
class onlinepayments.sdk.domain.subsequent_card_payment_method_specific_input.SubsequentCardPaymentMethodSpecificInput[source]

Bases: DataObject

__annotations__ = {'_SubsequentCardPaymentMethodSpecificInput__authorization_mode': typing.Optional[str], '_SubsequentCardPaymentMethodSpecificInput__market_place': typing.Optional[onlinepayments.sdk.domain.market_place.MarketPlace], '_SubsequentCardPaymentMethodSpecificInput__payment_number': typing.Optional[int], '_SubsequentCardPaymentMethodSpecificInput__scheme_reference_data': typing.Optional[str], '_SubsequentCardPaymentMethodSpecificInput__subsequent_type': typing.Optional[str], '_SubsequentCardPaymentMethodSpecificInput__token': typing.Optional[str], '_SubsequentCardPaymentMethodSpecificInput__transaction_channel': typing.Optional[str]}
property authorization_mode: str | None
Determines the type of the authorization that will be used. Allowed values:
  • FINAL_AUTHORIZATION - The payment creation results in an authorization that is ready for capture. Final authorizations can’t be reversed and need to be captured for the full amount within 7 days.

  • PRE_AUTHORIZATION - The payment creation results in a pre-authorization that is ready for capture. Pre-authortizations can be reversed and can be captured within 30 days. The capture amount can be lower than the authorized amount.

  • SALE - The payment creation results in an authorization that is already captured at the moment of approval.

Only used with some acquirers, ignored for acquirers that do not support this. In case the acquirer does not allow this to be specified the authorizationMode is ‘unspecified’, which behaves similar to a final authorization.

Type: str

from_dictionary(dictionary: dict) SubsequentCardPaymentMethodSpecificInput[source]
property market_place: MarketPlace | None
Object containing marketplace-related data for additional information on sub-merchants (retailers) transacting via the marketplace’s platform. This object is required for platforms onboarding multiple sellers to ensure accurate identification and attribution of each transaction. The platform must collect and submit the retailer’s country and regional information in accordance with card scheme requirements. In some cases, Visa may treat specific regions—such as EU member states—as a single country entity for regulatory and reporting purposes.

Type: onlinepayments.sdk.domain.market_place.MarketPlace

property payment_number: int | None
This payment’s ordinal number in the sequence of payments. As the payments are numbered from 1 to the totalNumberOfPayments provided at initialization of the sequence in the multiplePaymentInformation container, the allowed values for this field actually depend on whether the initial call to CreatePayment or CreateHostedCheckout led to a payment or not.
  • if the initial call led to a payment, since it is implicitly numbered 1, then the allowed values for this field range from 2 to the totalNumberOfPayments.

  • if the initial call did not lead to a payment (e.g. this was a 0 amount operation for authentication), then the allowed values for this field range from 1 to the totalNumberOfPayments.

Type: int

property scheme_reference_data: str | None
Deprecated: This is the unique Scheme Reference Data from the initial transaction that was performed with a Strong Customer Authentication. In case this value is unknown, a Scheme Reference of an earlier transaction that was part of the same sequence can be used as a fall-back. Still, it is strongly advised to submit this value for any Merchant Initiated Transaction or any recurring transaction (hereby defined as “Subsequent”).

Type: str

Deprecated; Deprecated

property subsequent_type: str | None
Determines the type of the subsequent that will be used. Allowed values:
  • Recurring - Transactions processed at fixed, regular intervals not to exceed one year between Transactions, representing an agreement between a cardholder and a merchant to purchase goods or services provided over a period of time. Note that a recurring MIT transaction is initiated by the merchant (payee) not the customer (payer) and so is out of scope of PSD2. Recurring transactions that are in scope of PSD2 (and therefore may benefit from the recurring transaction exemption) are those that are customer (payer) initiates, e.g. standing orders set up from a bank account.

  • Unscheduled - A transaction using a stored credential for a fixed or variable amount that does not occur on a scheduled or regularly occurring transaction date, where the cardholder has provided consent for the merchant to initiate one or more future transactions which are not initiated by the cardholder. This transaction type is based on an agreement with the cardholder and is not to be confused with cardholder initiated transactions performed with stored credentials (CITs are in scope of PSD2 whereas UCOF transactions are MITs and thus out of scope).

  • Installment - Installment payments describe a single purchase of goods or services billed to a cardholder in multiple transactions over a period of time agreed by the cardholder and merchant.

  • NoShow - A No-show is a transaction where the merchant is enabled to charge for services which the cardholder entered into an agreement to purchase but did not meet the terms of the agreement.

  • DelayedCharge - A delayed charge is typically used in hotel, cruise lines and vehicle rental payment scenarios to perform a supplemental account charge after original services are rendered.

  • PartialShipment - I-P e-Commerce scenario whereby credentials have been stored to enable subsequent MITs per shipment. For this type of use case, PartialShipment is expected on both the initial CIT and eventual subsequent MITs to complete the order.

  • Resubmission - This is an event that occurs when the original purchase occurred, but the merchant was not able to get authorization at the time the goods or services were provided. This is only applicable to contactless transit transactions.

Type: str

to_dictionary() dict[source]
property token: str | None
Deprecated: ID of the token to use to create the payment.

Type: str

Deprecated; ID of the token to use to create the payment.

property transaction_channel: str | None
Indicates the channel via which the payment is created. Allowed values:
  • ECOMMERCE - The transaction is a regular E-Commerce transaction.

  • MOTO - The transaction is a Mail Order/Telephone Order.

Defaults to ECOMMERCE.

Type: str

class onlinepayments.sdk.domain.subsequent_payment_product5001_specific_input.SubsequentPaymentProduct5001SpecificInput[source]

Bases: DataObject

__annotations__ = {'_SubsequentPaymentProduct5001SpecificInput__subsequent_type': typing.Optional[str]}
from_dictionary(dictionary: dict) SubsequentPaymentProduct5001SpecificInput[source]
property subsequent_type: str | None
Determines the type of the subsequent that will be used. Allowed values:
  • recurring - Transactions processed at fixed, regular intervals not to exceed one year between Transactions, representing an agreement between a consumer and a merchant to purchase goods or services provided over a period of time. Note that a recurring MIT transaction is initiated by the merchant (payee) not the customer (payer) and so is out of scope of PSD2. Recurring transactions that are in scope of PSD2 (and therefore may benefit from the recurring transaction exemption) are those that are customer (payer) initiates, e.g. standing orders set up from a bank account.

  • installment - Installment payments describe a single purchase of goods or services billed to a consumer in multiple transactions over a period of time agreed by the consumer and merchant.

  • other - other cases

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.subsequent_payment_request.SubsequentPaymentRequest[source]

Bases: DataObject

__annotations__ = {'_SubsequentPaymentRequest__omnichannel_subsequent_specific_input': typing.Optional[onlinepayments.sdk.domain.omnichannel_subsequent_specific_input.OmnichannelSubsequentSpecificInput], '_SubsequentPaymentRequest__order': typing.Optional[onlinepayments.sdk.domain.order.Order], '_SubsequentPaymentRequest__subsequent_payment_product5001_specific_input': typing.Optional[onlinepayments.sdk.domain.subsequent_payment_product5001_specific_input.SubsequentPaymentProduct5001SpecificInput], '_SubsequentPaymentRequest__subsequentcard_payment_method_specific_input': typing.Optional[onlinepayments.sdk.domain.subsequent_card_payment_method_specific_input.SubsequentCardPaymentMethodSpecificInput]}
from_dictionary(dictionary: dict) SubsequentPaymentRequest[source]
property omnichannel_subsequent_specific_input: OmnichannelSubsequentSpecificInput | None
This object contains additional subsequent details for omnichannel merchants.

Type: onlinepayments.sdk.domain.omnichannel_subsequent_specific_input.OmnichannelSubsequentSpecificInput

property order: Order | None
The order object contains order-related data; Please note that this object is required to submit the amount.

Type: onlinepayments.sdk.domain.order.Order

property subsequent_payment_product5001_specific_input: SubsequentPaymentProduct5001SpecificInput | None
Specific data is required for Bizum subsequent payment.

Type: onlinepayments.sdk.domain.subsequent_payment_product5001_specific_input.SubsequentPaymentProduct5001SpecificInput

property subsequentcard_payment_method_specific_input: SubsequentCardPaymentMethodSpecificInput | None
Object containing the specific input details for subsequent card payments

Type: onlinepayments.sdk.domain.subsequent_card_payment_method_specific_input.SubsequentCardPaymentMethodSpecificInput

to_dictionary() dict[source]
class onlinepayments.sdk.domain.subsequent_payment_response.SubsequentPaymentResponse[source]

Bases: DataObject

__annotations__ = {'_SubsequentPaymentResponse__payment': typing.Optional[onlinepayments.sdk.domain.payment_response.PaymentResponse]}
from_dictionary(dictionary: dict) SubsequentPaymentResponse[source]
property payment: PaymentResponse | None
This object holds the properties related to the payment.

Type: onlinepayments.sdk.domain.payment_response.PaymentResponse

to_dictionary() dict[source]
class onlinepayments.sdk.domain.surcharge.Surcharge[source]

Bases: DataObject

__annotations__ = {'_Surcharge__net_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_Surcharge__payment_product_id': typing.Optional[int], '_Surcharge__result': typing.Optional[str], '_Surcharge__surcharge_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_Surcharge__surcharge_rate': typing.Optional[onlinepayments.sdk.domain.surcharge_rate.SurchargeRate], '_Surcharge__total_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney]}
from_dictionary(dictionary: dict) Surcharge[source]
property net_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

property result: str | None
Token describing result. OK - A Surcharge Amount was successfully calculated, NO_SURCHARGE - A configured surcharge rate could not be found for the payment product

Type: str

property surcharge_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property surcharge_rate: SurchargeRate | None
A summary of surcharge details used in the calculation of the surcharge amount. null if result = NO_SURCHARGE

Type: onlinepayments.sdk.domain.surcharge_rate.SurchargeRate

to_dictionary() dict[source]
property total_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

class onlinepayments.sdk.domain.surcharge_calculation_card.SurchargeCalculationCard[source]

Bases: DataObject

__annotations__ = {'_SurchargeCalculationCard__card_number': typing.Optional[str], '_SurchargeCalculationCard__payment_product_id': typing.Optional[int]}
property card_number: str | None
The complete credit/debit card number (also known as the PAN) is always obfuscated in any of our responses.

Type: str

from_dictionary(dictionary: dict) SurchargeCalculationCard[source]
property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.surcharge_rate.SurchargeRate[source]

Bases: DataObject

__annotations__ = {'_SurchargeRate__ad_valorem_rate': typing.Optional[float], '_SurchargeRate__specific_rate': typing.Optional[int], '_SurchargeRate__surcharge_product_type_id': typing.Optional[str], '_SurchargeRate__surcharge_product_type_version': typing.Optional[str]}
property ad_valorem_rate: float | None
A percentage rate defined on a merchant’s configuration used in the calculation of a surcharge amount.

Type: float

from_dictionary(dictionary: dict) SurchargeRate[source]
property specific_rate: int | None
A specific, fixed rate in cents defined on a merchant’s configuration that is used in the calculation of a surcharge amount.

Type: int

property surcharge_product_type_id: str | None
The name of the applicable surcharge rates for the relevant payment product

Type: str

property surcharge_product_type_version: str | None
A specific version identifier of the surcharge rates as applied for this request

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.surcharge_specific_input.SurchargeSpecificInput[source]

Bases: DataObject

__annotations__ = {'_SurchargeSpecificInput__mode': typing.Optional[str], '_SurchargeSpecificInput__surcharge_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney]}
from_dictionary(dictionary: dict) SurchargeSpecificInput[source]
property mode: str | None
The surcharge mode which defines how a merchant will apply surcharging.
  • pass-through - Merchant to define and apply surcharge amount for a transaction for processing. This mode is not supported on Create Hosted Checkout Session.

  • on-behalf-of - Merchant to instruct the payment platform to calculate and apply a surcharge amount to a transaction, based on the merchant’s surcharge configuration, net amount, and payment product type.

Type: str

property surcharge_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

to_dictionary() dict[source]
class onlinepayments.sdk.domain.surcharge_specific_output.SurchargeSpecificOutput[source]

Bases: DataObject

__annotations__ = {'_SurchargeSpecificOutput__mode': typing.Optional[str], '_SurchargeSpecificOutput__surcharge_amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney], '_SurchargeSpecificOutput__surcharge_rate': typing.Optional[onlinepayments.sdk.domain.surcharge_rate.SurchargeRate]}
from_dictionary(dictionary: dict) SurchargeSpecificOutput[source]
property mode: str | None
The surcharge mode which defines how a merchant will apply surcharging.
  • pass-through - Merchant to define and apply surcharge amount for a transaction for processing. This mode is not supported on Create Hosted Checkout Session.

  • on-behalf-of - Merchant to instruct the payment platform to calculate and apply a surcharge amount to a transaction, based on the merchant’s surcharge configuration, net amount, and payment product type.

Type: str

property surcharge_amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

property surcharge_rate: SurchargeRate | None
A summary of surcharge details used in the calculation of the surcharge amount. null if result = NO_SURCHARGE

Type: onlinepayments.sdk.domain.surcharge_rate.SurchargeRate

to_dictionary() dict[source]
class onlinepayments.sdk.domain.test_connection.TestConnection[source]

Bases: DataObject

__annotations__ = {'_TestConnection__result': typing.Optional[str]}
from_dictionary(dictionary: dict) TestConnection[source]
property result: str | None

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.three_d_secure.ThreeDSecure[source]

Bases: DataObject

__annotations__ = {'_ThreeDSecure__authentication_amount': typing.Optional[int], '_ThreeDSecure__challenge_canvas_size': typing.Optional[str], '_ThreeDSecure__challenge_indicator': typing.Optional[str], '_ThreeDSecure__device_channel': typing.Optional[str], '_ThreeDSecure__exemption_request': typing.Optional[str], '_ThreeDSecure__external_cardholder_authentication_data': typing.Optional[onlinepayments.sdk.domain.external_cardholder_authentication_data.ExternalCardholderAuthenticationData], '_ThreeDSecure__merchant_fraud_rate': typing.Optional[int], '_ThreeDSecure__prior_three_d_secure_data': typing.Optional[onlinepayments.sdk.domain.three_d_secure_data.ThreeDSecureData], '_ThreeDSecure__redirection_data': typing.Optional[onlinepayments.sdk.domain.redirection_data.RedirectionData], '_ThreeDSecure__secure_corporate_payment': typing.Optional[bool], '_ThreeDSecure__skip_authentication': typing.Optional[bool], '_ThreeDSecure__skip_soft_decline': typing.Optional[bool]}
property authentication_amount: int | None
The amount to be authenticated. This field should be populated if the amount to be authenticated differs from the amount to be authorized (by default they are considered equal). Amount in cents and always having 2 decimals.

Type: int

property challenge_canvas_size: str | None
Dimensions of the challenge window that potentially will be displayed to the customer. The challenge content is formatted to appropriately render in this window to provide the best possible user experience. Preconfigured sizes are width x height in pixels of the window displayed in the customer browser window. Possible values are
  • 250x400 (default)

  • 390x400

  • 500x600

  • 600x400

  • full-screen

Type: str

property challenge_indicator: str | None
Allows you to indicate if you want the customer to be challenged for extra security on this transaction. Possible values:
  • no-preference - You have no preference whether or not to challenge the customer (default)

  • no-challenge-requested - you prefer the cardholder not to be challenged

  • challenge-requested - you prefer the customer to be challenged

  • challenge-required - you require the customer to be challenged

  • no-challenge-requested-risk-analysis-performed – letting the issuer know that you have already assessed the transaction with fraud prevention tool

  • no-challenge-requested-data-share-only – sharing data only with the DS

  • no-challenge-requested-consumer-authentication-performed – authentication already happened at your side – when login in to your website

  • no-challenge-requested-use-whitelist-exemption – cardholder has whitelisted you at with the issuer

  • challenge-requested-whitelist-prompt-requested – cardholder is trying to whitelist you

  • request-scoring-without-connecting-to-acs – sending information to CB DS for a fraud scoring

Type: str

property device_channel: str | None
Determines whether the call is coming from an application or from a browser * AppBased - Call is coming from an application. * Browser - Call is coming from a browser

Type: str

property exemption_request: str | None
In PSD2, the ExemptionRequest field is used by merchants requesting an exemption when not using authentication on a transaction, in order to keep the conversion up.
  • none = No exemption requested

  • transaction-risk-analysis = Fraud analysis has been done already by your own fraud module and transaction scored as low risk

  • low-value = Bellow 30 euros

  • whitelist = The cardholder has whitelisted you with their issuer

Type: str

property external_cardholder_authentication_data: ExternalCardholderAuthenticationData | None
Object containing 3D secure details.

Type: onlinepayments.sdk.domain.external_cardholder_authentication_data.ExternalCardholderAuthenticationData

from_dictionary(dictionary: dict) ThreeDSecure[source]
property merchant_fraud_rate: int | None
The merchant fraud rate in the EEA is calculated as the total EEA card fraud divided by all EEA card volumes, as per PSD2 RTS. Mastercard will not calculate or validate the merchant fraud score. Accepted values are:
  • 1 - represents a fraud rate less than or equal to 1 basis point (bp), which is 0.01%.

  • 2 - represents a fraud rate between 1 bp and 6 bps.

  • 3 - represents a fraud rate between 6 bps and 13 bps.

  • 4 - represents a fraud rate between 13 bps and 25 bps.

  • 5 - represents a fraud rate greater than 25 bps.

Type: int

property prior_three_d_secure_data: ThreeDSecureData | None
Object containing data regarding the customer authentication that occurred prior to the current transaction

Type: onlinepayments.sdk.domain.three_d_secure_data.ThreeDSecureData

property redirection_data: RedirectionData | None
Object containing browser specific redirection related data

Type: onlinepayments.sdk.domain.redirection_data.RedirectionData

property secure_corporate_payment: bool | None
Indicates that dedicated payment processes and procedures were used. A potential secure corporate payment exemption applies. Logically, this field should only be set to ‘yes’ if the acquirer exemption field is blank. A merchant cannot claim both acquirer exemption and secure payment. However, the DS will not validate the conditions in the extension; DS will pass data as presented.

Type: bool

property skip_authentication: bool | None
  • true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to “recurring”

  • false = 3D Secure authentication will not be skipped for this transaction

Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction

Type: bool

property skip_soft_decline: bool | None
  • true = Soft Decline retry mechanism will be skipped for this transaction. The transaction will result in “Authorization Declined” status. This setting should be used when skipAuthentication is set to true and the merchant does not want to use Soft Decline retry mechanism.

  • false = Soft Decline retry mechanism will not be skipped for this transaction.

Note: skipSoftDecline defaults to false if empty. This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction.

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.three_d_secure_base.ThreeDSecureBase[source]

Bases: DataObject

__annotations__ = {'_ThreeDSecureBase__authentication_amount': typing.Optional[int], '_ThreeDSecureBase__challenge_canvas_size': typing.Optional[str], '_ThreeDSecureBase__challenge_indicator': typing.Optional[str], '_ThreeDSecureBase__exemption_request': typing.Optional[str], '_ThreeDSecureBase__merchant_fraud_rate': typing.Optional[int], '_ThreeDSecureBase__prior_three_d_secure_data': typing.Optional[onlinepayments.sdk.domain.three_d_secure_data.ThreeDSecureData], '_ThreeDSecureBase__secure_corporate_payment': typing.Optional[bool], '_ThreeDSecureBase__skip_authentication': typing.Optional[bool], '_ThreeDSecureBase__skip_soft_decline': typing.Optional[bool]}
property authentication_amount: int | None
The amount to be authenticated. This field should be populated if the amount to be authenticated differs from the amount to be authorized (by default they are considered equal). Amount in cents and always having 2 decimals.

Type: int

property challenge_canvas_size: str | None
Dimensions of the challenge window that potentially will be displayed to the customer. The challenge content is formatted to appropriately render in this window to provide the best possible user experience. Preconfigured sizes are width x height in pixels of the window displayed in the customer browser window. Possible values are
  • 250x400 (default)

  • 390x400

  • 500x600

  • 600x400

  • full-screen

Type: str

property challenge_indicator: str | None
Allows you to indicate if you want the customer to be challenged for extra security on this transaction. Possible values:
  • no-preference - You have no preference whether or not to challenge the customer (default)

  • no-challenge-requested - you prefer the cardholder not to be challenged

  • challenge-requested - you prefer the customer to be challenged

  • challenge-required - you require the customer to be challenged

  • no-challenge-requested-risk-analysis-performed – letting the issuer know that you have already assessed the transaction with fraud prevention tool

  • no-challenge-requested-data-share-only – sharing data only with the DS

  • no-challenge-requested-consumer-authentication-performed – authentication already happened at your side – when login in to your website

  • no-challenge-requested-use-whitelist-exemption – cardholder has whitelisted you at with the issuer

  • challenge-requested-whitelist-prompt-requested – cardholder is trying to whitelist you

  • request-scoring-without-connecting-to-acs – sending information to CB DS for a fraud scoring

Type: str

property exemption_request: str | None
In PSD2, the ExemptionRequest field is used by merchants requesting an exemption when not using authentication on a transaction, in order to keep the conversion up.
  • none = No exemption requested

  • transaction-risk-analysis = Fraud analysis has been done already by your own fraud module and transaction scored as low risk

  • low-value = Bellow 30 euros

  • whitelist = The cardholder has whitelisted you with their issuer

Type: str

from_dictionary(dictionary: dict) ThreeDSecureBase[source]
property merchant_fraud_rate: int | None
The merchant fraud rate in the EEA is calculated as the total EEA card fraud divided by all EEA card volumes, as per PSD2 RTS. Mastercard will not calculate or validate the merchant fraud score. Accepted values are:
  • 1 - represents a fraud rate less than or equal to 1 basis point (bp), which is 0.01%.

  • 2 - represents a fraud rate between 1 bp and 6 bps.

  • 3 - represents a fraud rate between 6 bps and 13 bps.

  • 4 - represents a fraud rate between 13 bps and 25 bps.

  • 5 - represents a fraud rate greater than 25 bps.

Type: int

property prior_three_d_secure_data: ThreeDSecureData | None
Object containing data regarding the customer authentication that occurred prior to the current transaction

Type: onlinepayments.sdk.domain.three_d_secure_data.ThreeDSecureData

property secure_corporate_payment: bool | None
Indicates that dedicated payment processes and procedures were used. A potential secure corporate payment exemption applies. Logically, this field should only be set to ‘yes’ if the acquirer exemption field is blank. A merchant cannot claim both acquirer exemption and secure payment. However, the DS will not validate the conditions in the extension; DS will pass data as presented.

Type: bool

property skip_authentication: bool | None
  • true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to “recurring”

  • false = 3D Secure authentication will not be skipped for this transaction

Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction

Type: bool

property skip_soft_decline: bool | None
  • true = Soft Decline retry mechanism will be skipped for this transaction. The transaction will result in “Authorization Declined” status. This setting should be used when skipAuthentication is set to true and the merchant does not want to use Soft Decline retry mechanism.

  • false = Soft Decline retry mechanism will not be skipped for this transaction.

Note: skipSoftDecline defaults to false if empty. This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction.

Type: bool

to_dictionary() dict[source]
class onlinepayments.sdk.domain.three_d_secure_data.ThreeDSecureData[source]

Bases: DataObject

__annotations__ = {'_ThreeDSecureData__acs_transaction_id': typing.Optional[str], '_ThreeDSecureData__method': typing.Optional[str], '_ThreeDSecureData__utc_timestamp': typing.Optional[str]}
property acs_transaction_id: str | None
The ACS Transaction ID for a prior 3-D Secure authenticated transaction (for example, the first recurring transaction that was authenticated with the customer)

Type: str

from_dictionary(dictionary: dict) ThreeDSecureData[source]
property method: str | None
Method of authentication used for this transaction. Possible values:
  • frictionless = The authentication went without a challenge

  • challenged = Cardholder was challenged

  • avs-verified = The authentication was verified by AVS

  • other = Another issuer method was used to authenticate this transaction

Type: str

to_dictionary() dict[source]
property utc_timestamp: str | None
Timestamp in UTC (YYYYMMDDHHmm) of the 3-D Secure authentication of this transaction

Type: str

class onlinepayments.sdk.domain.three_d_secure_results.ThreeDSecureResults[source]

Bases: DataObject

__annotations__ = {'_ThreeDSecureResults__acs_transaction_id': typing.Optional[str], '_ThreeDSecureResults__applied_exemption': typing.Optional[str], '_ThreeDSecureResults__authentication_status': typing.Optional[str], '_ThreeDSecureResults__cavv': typing.Optional[str], '_ThreeDSecureResults__challenge_indicator': typing.Optional[str], '_ThreeDSecureResults__ds_transaction_id': typing.Optional[str], '_ThreeDSecureResults__eci': typing.Optional[str], '_ThreeDSecureResults__exemption_engine_flow': typing.Optional[str], '_ThreeDSecureResults__flow': typing.Optional[str], '_ThreeDSecureResults__liability': typing.Optional[str], '_ThreeDSecureResults__scheme_eci': typing.Optional[str], '_ThreeDSecureResults__version': typing.Optional[str], '_ThreeDSecureResults__xid': typing.Optional[str]}
property acs_transaction_id: str | None
Authenticated Transaction Identifier at the ACS/Issuer.

Type: str

property applied_exemption: str | None
Exemption requested and applied in the authorization

Type: str

property authentication_status: str | None
One-letter authentication status returned by DS. Possible values are:
  • Y - Authentication succeeded

  • A - Authentication attempted

  • I - Information only, liability shifted to the merchant

  • N - Authentication failed

  • R - Authentication rejected

  • U - Authentication unavailable

  • C - Authentication required

Type: str

property cavv: str | None
Cardholder Authentication Verification Value. End-2-end reference generated by the Issuer to recognize that the authentication has taken place.

Type: str

property challenge_indicator: str | None
Challenge Indicator used for this transaction. This value might differ from the one sent by the merchant if the card is not supporting it (3DS version 2.1 vs 3DS version 2.2).

Type: str

property ds_transaction_id: str | None
3D Secure Directory Server Transaction Identifier used for this transaction.

Type: str

property eci: str | None
Indicates Authentication validation results returned after AuthenticationValidation

Type: str

property exemption_engine_flow: str | None
Detailed description of the Exemption Engine outcomes

Type: str

property flow: str | None
3D Secure Flow used during this transaction.

Type: str

from_dictionary(dictionary: dict) ThreeDSecureResults[source]
property liability: str | None
Determines the Fraud liability. Possible values are:
  • issuer - Fraud liability shifts to the issuer

  • merchant - Fraud liability with the merchant

Note: When not filled in Fraud liability is not applicable for the current transaction.

Type: str

property scheme_eci: str | None
3D Secure ECI (Electronic Commerce Indicator) depending on the Scheme. Returned by DS.

Type: str

to_dictionary() dict[source]
property version: str | None
3D Secure Protocol version used during this transaction.

Type: str

property xid: str | None
Transaction ID for the Authentication

Type: str

class onlinepayments.sdk.domain.token_card.TokenCard[source]

Bases: DataObject

__annotations__ = {'_TokenCard__alias': typing.Optional[str], '_TokenCard__data': typing.Optional[onlinepayments.sdk.domain.token_card_data.TokenCardData]}
property alias: str | None
An alias for the token. This can be used to visually represent the token.

Type: str

property data: TokenCardData | None

Type: onlinepayments.sdk.domain.token_card_data.TokenCardData

from_dictionary(dictionary: dict) TokenCard[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.token_card_data.TokenCardData[source]

Bases: DataObject

__annotations__ = {'_TokenCardData__card_bin_details': typing.Optional[onlinepayments.sdk.domain.card_bin_details.CardBinDetails], '_TokenCardData__card_without_cvv': typing.Optional[onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv], '_TokenCardData__cobrand_selection_indicator': typing.Optional[str]}
property card_bin_details: CardBinDetails | None
Card BIN details

Type: onlinepayments.sdk.domain.card_bin_details.CardBinDetails

property card_without_cvv: CardWithoutCvv | None

Type: onlinepayments.sdk.domain.card_without_cvv.CardWithoutCvv

property cobrand_selection_indicator: str | None
For cobranded cards, this field indicates the brand selection method:
  • default - The holder implicitly accepted the default brand.

  • alternative - The holder explicitly selected an alternative brand.

  • notApplicable - The card is not cobranded.

Type: str

from_dictionary(dictionary: dict) TokenCardData[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.token_card_specific_input.TokenCardSpecificInput[source]

Bases: DataObject

__annotations__ = {'_TokenCardSpecificInput__data': typing.Optional[onlinepayments.sdk.domain.token_data.TokenData]}
property data: TokenData | None
Object containing the token details for a card

Type: onlinepayments.sdk.domain.token_data.TokenData

from_dictionary(dictionary: dict) TokenCardSpecificInput[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.token_data.TokenData[source]

Bases: DataObject

__annotations__ = {'_TokenData__card': typing.Optional[onlinepayments.sdk.domain.card.Card], '_TokenData__cobrand_selection_indicator': typing.Optional[str]}
property card: Card | None
Object containing card details

Type: onlinepayments.sdk.domain.card.Card

property cobrand_selection_indicator: str | None
For cobranded cards, this field indicates the brand selection method:
  • default - The holder implicitly accepted the default brand.

  • alternative - The holder explicitly selected an alternative brand.

  • notApplicable - The card is not cobranded.

Type: str

from_dictionary(dictionary: dict) TokenData[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.token_e_wallet.TokenEWallet[source]

Bases: DataObject

__annotations__ = {'_TokenEWallet__alias': typing.Optional[str], '_TokenEWallet__customer': typing.Optional[onlinepayments.sdk.domain.customer_token.CustomerToken]}
property alias: str | None
Deprecated: This field is not used by any payment product An alias for the token. This can be used to visually represent the token.

Type: str

Deprecated; This field is not used by any payment product An alias for the token. This can be used to visually represent the token.

property customer: CustomerToken | None

Type: onlinepayments.sdk.domain.customer_token.CustomerToken

from_dictionary(dictionary: dict) TokenEWallet[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.token_response.TokenResponse[source]

Bases: DataObject

__annotations__ = {'_TokenResponse__card': typing.Optional[onlinepayments.sdk.domain.token_card.TokenCard], '_TokenResponse__crm_token': typing.Optional[onlinepayments.sdk.domain.crm_token.CrmToken], '_TokenResponse__e_wallet': typing.Optional[onlinepayments.sdk.domain.token_e_wallet.TokenEWallet], '_TokenResponse__external_token_linked': typing.Optional[onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked], '_TokenResponse__id': typing.Optional[str], '_TokenResponse__is_temporary': typing.Optional[bool], '_TokenResponse__network_token_linked': typing.Optional[onlinepayments.sdk.domain.network_token_linked.NetworkTokenLinked], '_TokenResponse__payment_product_id': typing.Optional[int]}
property card: TokenCard | None
Object containing card details

Type: onlinepayments.sdk.domain.token_card.TokenCard

property crm_token: CrmToken | None
The CRM (Customer Relationship Management) token group. CRM tokens are available to enhance knowledge of a merchant’s customers by attempting to identify the customer.

Type: onlinepayments.sdk.domain.crm_token.CrmToken

property e_wallet: TokenEWallet | None
Object containing eWallet details

Type: onlinepayments.sdk.domain.token_e_wallet.TokenEWallet

property external_token_linked: ExternalTokenLinked | None

Type: onlinepayments.sdk.domain.external_token_linked.ExternalTokenLinked

from_dictionary(dictionary: dict) TokenResponse[source]
property id: str | None
ID of the token

Type: str

property is_temporary: bool | None
Temporary tokens have a lifespan of two hours and can only be used once.

Type: bool

property network_token_linked: NetworkTokenLinked | None
Object containing Network Token details, when the Network Token was created on behalf of the merchant and is activated.

Type: onlinepayments.sdk.domain.network_token_linked.NetworkTokenLinked

property payment_product_id: int | None
Payment product identifier - Please see Products documentation for a full overview of possible values.

Type: int

to_dictionary() dict[source]
class onlinepayments.sdk.domain.transaction.Transaction[source]

Bases: DataObject

__annotations__ = {'_Transaction__amount': typing.Optional[onlinepayments.sdk.domain.amount_of_money.AmountOfMoney]}
property amount: AmountOfMoney | None
Object containing amount and ISO currency code attributes

Type: onlinepayments.sdk.domain.amount_of_money.AmountOfMoney

from_dictionary(dictionary: dict) Transaction[source]
to_dictionary() dict[source]
class onlinepayments.sdk.domain.validate_credentials_request.ValidateCredentialsRequest[source]

Bases: DataObject

__annotations__ = {'_ValidateCredentialsRequest__key': typing.Optional[str], '_ValidateCredentialsRequest__secret': typing.Optional[str]}
from_dictionary(dictionary: dict) ValidateCredentialsRequest[source]
property key: str | None
The webhook key and without any change applied to it.

Type: str

property secret: str | None
Send here the hashed webhooks key secret in the same way as the check is done in your system. The only difference is instead of providing the current body of the message, use an empty string as body while hashing it.

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.validate_credentials_response.ValidateCredentialsResponse[source]

Bases: DataObject

__annotations__ = {'_ValidateCredentialsResponse__result': typing.Optional[str]}
from_dictionary(dictionary: dict) ValidateCredentialsResponse[source]
property result: str | None
The webhooks validation was OK (Valid) or not OK (Invalid).

Type: str

to_dictionary() dict[source]
class onlinepayments.sdk.domain.value_mapping_element.ValueMappingElement[source]

Bases: DataObject

__annotations__ = {'_ValueMappingElement__display_elements': typing.Optional[typing.List[onlinepayments.sdk.domain.payment_product_field_display_element.PaymentProductFieldDisplayElement]], '_ValueMappingElement__value': typing.Optional[str]}
property display_elements: List[PaymentProductFieldDisplayElement] | None

Type: list[onlinepayments.sdk.domain.payment_product_field_display_element.PaymentProductFieldDisplayElement]

from_dictionary(dictionary: dict) ValueMappingElement[source]
to_dictionary() dict[source]
property value: str | None
Value corresponding to the key

Type: str

class onlinepayments.sdk.merchant.i_merchant_client.IMerchantClient[source]

Bases: ABC

Merchant client interface. Thread-safe.

__abstractmethods__ = frozenset({'captures', 'complete', 'hosted_checkout', 'hosted_tokenization', 'mandates', 'payment_links', 'payments', 'payouts', 'privacy_policy', 'product_groups', 'products', 'refunds', 'services', 'sessions', 'subsequent', 'tokens', 'webhooks'})
abstractmethod captures() ICapturesClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/captures

Returns:

onlinepayments.sdk.merchant.captures.i_captures_client.ICapturesClient

abstractmethod complete() ICompleteClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/complete

Returns:

onlinepayments.sdk.merchant.complete.i_complete_client.ICompleteClient

abstractmethod hosted_checkout() IHostedCheckoutClient[source]

Resource /v2/{merchantId}/hostedcheckouts

Returns:

onlinepayments.sdk.merchant.hostedcheckout.i_hosted_checkout_client.IHostedCheckoutClient

abstractmethod hosted_tokenization() IHostedTokenizationClient[source]

Resource /v2/{merchantId}/hostedtokenizations

Returns:

onlinepayments.sdk.merchant.hostedtokenization.i_hosted_tokenization_client.IHostedTokenizationClient

abstractmethod mandates() IMandatesClient[source]

Resource /v2/{merchantId}/mandates

Returns:

onlinepayments.sdk.merchant.mandates.i_mandates_client.IMandatesClient

Resource /v2/{merchantId}/paymentlinks

Returns:

onlinepayments.sdk.merchant.paymentlinks.i_payment_links_client.IPaymentLinksClient

abstractmethod payments() IPaymentsClient[source]

Resource /v2/{merchantId}/payments

Returns:

onlinepayments.sdk.merchant.payments.i_payments_client.IPaymentsClient

abstractmethod payouts() IPayoutsClient[source]

Resource /v2/{merchantId}/payouts

Returns:

onlinepayments.sdk.merchant.payouts.i_payouts_client.IPayoutsClient

abstractmethod privacy_policy() IPrivacyPolicyClient[source]

Resource /v2/{merchantId}/services/privacypolicy

Returns:

onlinepayments.sdk.merchant.privacypolicy.i_privacy_policy_client.IPrivacyPolicyClient

abstractmethod product_groups() IProductGroupsClient[source]

Resource /v2/{merchantId}/productgroups

Returns:

onlinepayments.sdk.merchant.productgroups.i_product_groups_client.IProductGroupsClient

abstractmethod products() IProductsClient[source]

Resource /v2/{merchantId}/products

Returns:

onlinepayments.sdk.merchant.products.i_products_client.IProductsClient

abstractmethod refunds() IRefundsClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/refunds

Returns:

onlinepayments.sdk.merchant.refunds.i_refunds_client.IRefundsClient

abstractmethod services() IServicesClient[source]

Resource /v2/{merchantId}/services/testconnection

Returns:

onlinepayments.sdk.merchant.services.i_services_client.IServicesClient

abstractmethod sessions() ISessionsClient[source]

Resource /v2/{merchantId}/sessions

Returns:

onlinepayments.sdk.merchant.sessions.i_sessions_client.ISessionsClient

abstractmethod subsequent() ISubsequentClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/subsequent

Returns:

onlinepayments.sdk.merchant.subsequent.i_subsequent_client.ISubsequentClient

abstractmethod tokens() ITokensClient[source]

Resource /v2/{merchantId}/tokens

Returns:

onlinepayments.sdk.merchant.tokens.i_tokens_client.ITokensClient

abstractmethod webhooks() IWebhooksClient[source]

Resource /v2/{merchantId}/webhooks/validateCredentials

Returns:

onlinepayments.sdk.merchant.webhooks.i_webhooks_client.IWebhooksClient

class onlinepayments.sdk.merchant.merchant_client.MerchantClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IMerchantClient

Merchant client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

captures() ICapturesClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/captures

Returns:

onlinepayments.sdk.merchant.captures.i_captures_client.ICapturesClient

complete() ICompleteClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/complete

Returns:

onlinepayments.sdk.merchant.complete.i_complete_client.ICompleteClient

hosted_checkout() IHostedCheckoutClient[source]

Resource /v2/{merchantId}/hostedcheckouts

Returns:

onlinepayments.sdk.merchant.hostedcheckout.i_hosted_checkout_client.IHostedCheckoutClient

hosted_tokenization() IHostedTokenizationClient[source]

Resource /v2/{merchantId}/hostedtokenizations

Returns:

onlinepayments.sdk.merchant.hostedtokenization.i_hosted_tokenization_client.IHostedTokenizationClient

mandates() IMandatesClient[source]

Resource /v2/{merchantId}/mandates

Returns:

onlinepayments.sdk.merchant.mandates.i_mandates_client.IMandatesClient

Resource /v2/{merchantId}/paymentlinks

Returns:

onlinepayments.sdk.merchant.paymentlinks.i_payment_links_client.IPaymentLinksClient

payments() IPaymentsClient[source]

Resource /v2/{merchantId}/payments

Returns:

onlinepayments.sdk.merchant.payments.i_payments_client.IPaymentsClient

payouts() IPayoutsClient[source]

Resource /v2/{merchantId}/payouts

Returns:

onlinepayments.sdk.merchant.payouts.i_payouts_client.IPayoutsClient

privacy_policy() IPrivacyPolicyClient[source]

Resource /v2/{merchantId}/services/privacypolicy

Returns:

onlinepayments.sdk.merchant.privacypolicy.i_privacy_policy_client.IPrivacyPolicyClient

product_groups() IProductGroupsClient[source]

Resource /v2/{merchantId}/productgroups

Returns:

onlinepayments.sdk.merchant.productgroups.i_product_groups_client.IProductGroupsClient

products() IProductsClient[source]

Resource /v2/{merchantId}/products

Returns:

onlinepayments.sdk.merchant.products.i_products_client.IProductsClient

refunds() IRefundsClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/refunds

Returns:

onlinepayments.sdk.merchant.refunds.i_refunds_client.IRefundsClient

services() IServicesClient[source]

Resource /v2/{merchantId}/services/testconnection

Returns:

onlinepayments.sdk.merchant.services.i_services_client.IServicesClient

sessions() ISessionsClient[source]

Resource /v2/{merchantId}/sessions

Returns:

onlinepayments.sdk.merchant.sessions.i_sessions_client.ISessionsClient

subsequent() ISubsequentClient[source]

Resource /v2/{merchantId}/payments/{paymentId}/subsequent

Returns:

onlinepayments.sdk.merchant.subsequent.i_subsequent_client.ISubsequentClient

tokens() ITokensClient[source]

Resource /v2/{merchantId}/tokens

Returns:

onlinepayments.sdk.merchant.tokens.i_tokens_client.ITokensClient

webhooks() IWebhooksClient[source]

Resource /v2/{merchantId}/webhooks/validateCredentials

Returns:

onlinepayments.sdk.merchant.webhooks.i_webhooks_client.IWebhooksClient

class onlinepayments.sdk.merchant.captures.captures_client.CapturesClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, ICapturesClient

Captures client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

get_captures(payment_id: str, context: CallContext | None = None) CapturesResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/captures - Get captures of payment

Parameters:
Returns:

onlinepayments.sdk.domain.captures_response.CapturesResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.captures.i_captures_client.ICapturesClient[source]

Bases: ABC

Captures client interface. Thread-safe.

__abstractmethods__ = frozenset({'get_captures'})
__annotations__ = {}
abstractmethod get_captures(payment_id: str, context: CallContext | None = None) CapturesResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/captures - Get captures of payment

Parameters:
Returns:

onlinepayments.sdk.domain.captures_response.CapturesResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.complete.complete_client.CompleteClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, ICompleteClient

Complete client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

complete_payment(payment_id: str, body: CompletePaymentRequest, context: CallContext | None = None) CompletePaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/complete - Complete payment

Parameters:
Returns:

onlinepayments.sdk.domain.complete_payment_response.CompletePaymentResponse

Raises:
  • DeclinedPaymentException – if the payment platform declined / rejected the payment. The payment result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.complete.i_complete_client.ICompleteClient[source]

Bases: ABC

Complete client interface. Thread-safe.

__abstractmethods__ = frozenset({'complete_payment'})
__annotations__ = {}
abstractmethod complete_payment(payment_id: str, body: CompletePaymentRequest, context: CallContext | None = None) CompletePaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/complete - Complete payment

Parameters:
Returns:

onlinepayments.sdk.domain.complete_payment_response.CompletePaymentResponse

Raises:
  • DeclinedPaymentException – if the payment platform declined / rejected the payment. The payment result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.hostedcheckout.hosted_checkout_client.HostedCheckoutClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IHostedCheckoutClient

HostedCheckout client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

create_hosted_checkout(body: CreateHostedCheckoutRequest, context: CallContext | None = None) CreateHostedCheckoutResponse[source]

Resource /v2/{merchantId}/hostedcheckouts - Create hosted checkout

Parameters:
Returns:

onlinepayments.sdk.domain.create_hosted_checkout_response.CreateHostedCheckoutResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_hosted_checkout(hosted_checkout_id: str, context: CallContext | None = None) GetHostedCheckoutResponse[source]

Resource /v2/{merchantId}/hostedcheckouts/{hostedCheckoutId} - Get hosted checkout status

Parameters:
Returns:

onlinepayments.sdk.domain.get_hosted_checkout_response.GetHostedCheckoutResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.hostedcheckout.i_hosted_checkout_client.IHostedCheckoutClient[source]

Bases: ABC

HostedCheckout client interface. Thread-safe.

__abstractmethods__ = frozenset({'create_hosted_checkout', 'get_hosted_checkout'})
__annotations__ = {}
abstractmethod create_hosted_checkout(body: CreateHostedCheckoutRequest, context: CallContext | None = None) CreateHostedCheckoutResponse[source]

Resource /v2/{merchantId}/hostedcheckouts - Create hosted checkout

Parameters:
Returns:

onlinepayments.sdk.domain.create_hosted_checkout_response.CreateHostedCheckoutResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_hosted_checkout(hosted_checkout_id: str, context: CallContext | None = None) GetHostedCheckoutResponse[source]

Resource /v2/{merchantId}/hostedcheckouts/{hostedCheckoutId} - Get hosted checkout status

Parameters:
Returns:

onlinepayments.sdk.domain.get_hosted_checkout_response.GetHostedCheckoutResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.hostedtokenization.hosted_tokenization_client.HostedTokenizationClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IHostedTokenizationClient

HostedTokenization client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

create_hosted_tokenization(body: CreateHostedTokenizationRequest, context: CallContext | None = None) CreateHostedTokenizationResponse[source]

Resource /v2/{merchantId}/hostedtokenizations - Create hosted tokenization session

Parameters:
Returns:

onlinepayments.sdk.domain.create_hosted_tokenization_response.CreateHostedTokenizationResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_hosted_tokenization(hosted_tokenization_id: str, context: CallContext | None = None) GetHostedTokenizationResponse[source]

Resource /v2/{merchantId}/hostedtokenizations/{hostedTokenizationId} - Get hosted tokenization session

Parameters:
Returns:

onlinepayments.sdk.domain.get_hosted_tokenization_response.GetHostedTokenizationResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.hostedtokenization.i_hosted_tokenization_client.IHostedTokenizationClient[source]

Bases: ABC

HostedTokenization client interface. Thread-safe.

__abstractmethods__ = frozenset({'create_hosted_tokenization', 'get_hosted_tokenization'})
__annotations__ = {}
abstractmethod create_hosted_tokenization(body: CreateHostedTokenizationRequest, context: CallContext | None = None) CreateHostedTokenizationResponse[source]

Resource /v2/{merchantId}/hostedtokenizations - Create hosted tokenization session

Parameters:
Returns:

onlinepayments.sdk.domain.create_hosted_tokenization_response.CreateHostedTokenizationResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_hosted_tokenization(hosted_tokenization_id: str, context: CallContext | None = None) GetHostedTokenizationResponse[source]

Resource /v2/{merchantId}/hostedtokenizations/{hostedTokenizationId} - Get hosted tokenization session

Parameters:
Returns:

onlinepayments.sdk.domain.get_hosted_tokenization_response.GetHostedTokenizationResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.mandates.i_mandates_client.IMandatesClient[source]

Bases: ABC

Mandates client interface. Thread-safe.

__abstractmethods__ = frozenset({'block_mandate', 'create_mandate', 'get_mandate', 'revoke_mandate', 'unblock_mandate'})
__annotations__ = {}
abstractmethod block_mandate(unique_mandate_reference: str, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/block - Block mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod create_mandate(body: CreateMandateRequest, context: CallContext | None = None) CreateMandateResponse[source]

Resource /v2/{merchantId}/mandates - Create mandate

Parameters:
Returns:

onlinepayments.sdk.domain.create_mandate_response.CreateMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_mandate(unique_mandate_reference: str, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference} - Get mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod revoke_mandate(unique_mandate_reference: str, body: RevokeMandateRequest, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/revoke - Revoke mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod unblock_mandate(unique_mandate_reference: str, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/unblock - Unblock mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.mandates.mandates_client.MandatesClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IMandatesClient

Mandates client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

block_mandate(unique_mandate_reference: str, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/block - Block mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

create_mandate(body: CreateMandateRequest, context: CallContext | None = None) CreateMandateResponse[source]

Resource /v2/{merchantId}/mandates - Create mandate

Parameters:
Returns:

onlinepayments.sdk.domain.create_mandate_response.CreateMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_mandate(unique_mandate_reference: str, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference} - Get mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

revoke_mandate(unique_mandate_reference: str, body: RevokeMandateRequest, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/revoke - Revoke mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

unblock_mandate(unique_mandate_reference: str, context: CallContext | None = None) GetMandateResponse[source]

Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/unblock - Unblock mandate

Parameters:
Returns:

onlinepayments.sdk.domain.get_mandate_response.GetMandateResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.payments.i_payments_client.IPaymentsClient[source]

Bases: ABC

Payments client interface. Thread-safe.

__abstractmethods__ = frozenset({'cancel_payment', 'capture_payment', 'create_payment', 'get_payment', 'get_payment_details', 'refund_payment'})
__annotations__ = {}
abstractmethod cancel_payment(payment_id: str, body: CancelPaymentRequest, context: CallContext | None = None) CancelPaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel payment

Parameters:
Returns:

onlinepayments.sdk.domain.cancel_payment_response.CancelPaymentResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod capture_payment(payment_id: str, body: CapturePaymentRequest, context: CallContext | None = None) CaptureResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment

Parameters:
Returns:

onlinepayments.sdk.domain.capture_response.CaptureResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod create_payment(body: CreatePaymentRequest, context: CallContext | None = None) CreatePaymentResponse[source]

Resource /v2/{merchantId}/payments - Create payment

Parameters:
Returns:

onlinepayments.sdk.domain.create_payment_response.CreatePaymentResponse

Raises:
  • DeclinedPaymentException – if the payment platform declined / rejected the payment. The payment result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_payment(payment_id: str, context: CallContext | None = None) PaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId} - Get payment

Parameters:
Returns:

onlinepayments.sdk.domain.payment_response.PaymentResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_payment_details(payment_id: str, context: CallContext | None = None) PaymentDetailsResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment details

Parameters:
Returns:

onlinepayments.sdk.domain.payment_details_response.PaymentDetailsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod refund_payment(payment_id: str, body: RefundRequest, context: CallContext | None = None) RefundResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment

Parameters:
Returns:

onlinepayments.sdk.domain.refund_response.RefundResponse

Raises:
  • DeclinedRefundException – if the payment platform declined / rejected the refund. The refund result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.payments.payments_client.PaymentsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IPaymentsClient

Payments client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

cancel_payment(payment_id: str, body: CancelPaymentRequest, context: CallContext | None = None) CancelPaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel payment

Parameters:
Returns:

onlinepayments.sdk.domain.cancel_payment_response.CancelPaymentResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

capture_payment(payment_id: str, body: CapturePaymentRequest, context: CallContext | None = None) CaptureResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment

Parameters:
Returns:

onlinepayments.sdk.domain.capture_response.CaptureResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

create_payment(body: CreatePaymentRequest, context: CallContext | None = None) CreatePaymentResponse[source]

Resource /v2/{merchantId}/payments - Create payment

Parameters:
Returns:

onlinepayments.sdk.domain.create_payment_response.CreatePaymentResponse

Raises:
  • DeclinedPaymentException – if the payment platform declined / rejected the payment. The payment result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_payment(payment_id: str, context: CallContext | None = None) PaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId} - Get payment

Parameters:
Returns:

onlinepayments.sdk.domain.payment_response.PaymentResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_payment_details(payment_id: str, context: CallContext | None = None) PaymentDetailsResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment details

Parameters:
Returns:

onlinepayments.sdk.domain.payment_details_response.PaymentDetailsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

refund_payment(payment_id: str, body: RefundRequest, context: CallContext | None = None) RefundResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment

Parameters:
Returns:

onlinepayments.sdk.domain.refund_response.RefundResponse

Raises:
  • DeclinedRefundException – if the payment platform declined / rejected the refund. The refund result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.payouts.i_payouts_client.IPayoutsClient[source]

Bases: ABC

Payouts client interface. Thread-safe.

__abstractmethods__ = frozenset({'create_payout', 'get_payout'})
__annotations__ = {}
abstractmethod create_payout(body: CreatePayoutRequest, context: CallContext | None = None) PayoutResponse[source]

Resource /v2/{merchantId}/payouts - Create payout

Parameters:
Returns:

onlinepayments.sdk.domain.payout_response.PayoutResponse

Raises:
  • DeclinedPayoutException – if the payment platform declined / rejected the payout. The payout result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_payout(payout_id: str, context: CallContext | None = None) PayoutResponse[source]

Resource /v2/{merchantId}/payouts/{payoutId} - Get payout

Parameters:
Returns:

onlinepayments.sdk.domain.payout_response.PayoutResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.payouts.payouts_client.PayoutsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IPayoutsClient

Payouts client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

create_payout(body: CreatePayoutRequest, context: CallContext | None = None) PayoutResponse[source]

Resource /v2/{merchantId}/payouts - Create payout

Parameters:
Returns:

onlinepayments.sdk.domain.payout_response.PayoutResponse

Raises:
  • DeclinedPayoutException – if the payment platform declined / rejected the payout. The payout result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_payout(payout_id: str, context: CallContext | None = None) PayoutResponse[source]

Resource /v2/{merchantId}/payouts/{payoutId} - Get payout

Parameters:
Returns:

onlinepayments.sdk.domain.payout_response.PayoutResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.privacypolicy.get_privacy_policy_params.GetPrivacyPolicyParams[source]

Bases: ParamRequest

Query parameters for Get Privacy Policy

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetPrivacyPolicyParams__locale': typing.Optional[str], '_GetPrivacyPolicyParams__payment_product_id': typing.Optional[int], '__locale': 'Optional[str]', '__payment_product_id': 'Optional[int]'}
property locale: str | None
Locale in which the privacy policy will be returned.

Type: str

property payment_product_id: int | None
ID of the specific payment product for which you wish to retrieve the privacy policy. When none is provided you will receive a complete policy for all the payment methods available for the specified merchantId.

Type: int

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.privacypolicy.i_privacy_policy_client.IPrivacyPolicyClient[source]

Bases: ABC

PrivacyPolicy client interface. Thread-safe.

__abstractmethods__ = frozenset({'get_privacy_policy'})
__annotations__ = {}
abstractmethod get_privacy_policy(query: GetPrivacyPolicyParams, context: CallContext | None = None) GetPrivacyPolicyResponse[source]

Resource /v2/{merchantId}/services/privacypolicy - Get Privacy Policy

Parameters:
Returns:

onlinepayments.sdk.domain.get_privacy_policy_response.GetPrivacyPolicyResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.privacypolicy.privacy_policy_client.PrivacyPolicyClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IPrivacyPolicyClient

PrivacyPolicy client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

get_privacy_policy(query: GetPrivacyPolicyParams, context: CallContext | None = None) GetPrivacyPolicyResponse[source]

Resource /v2/{merchantId}/services/privacypolicy - Get Privacy Policy

Parameters:
Returns:

onlinepayments.sdk.domain.get_privacy_policy_response.GetPrivacyPolicyResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.productgroups.get_product_group_params.GetProductGroupParams[source]

Bases: ParamRequest

Query parameters for Get product group

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetProductGroupParams__amount': typing.Optional[int], '_GetProductGroupParams__country_code': typing.Optional[str], '_GetProductGroupParams__currency_code': typing.Optional[str], '_GetProductGroupParams__hide': typing.Optional[typing.List[str]], '_GetProductGroupParams__is_recurring': typing.Optional[bool], '_GetProductGroupParams__locale': typing.Optional[str], '__amount': 'Optional[int]', '__country_code': 'Optional[str]', '__currency_code': 'Optional[str]', '__hide': 'Optional[List[str]]', '__is_recurring': 'Optional[bool]', '__locale': 'Optional[str]'}
add_hide(value: str) None[source]
Parameters:

value – str

property amount: int | None
Whole amount in cents (not containing any decimals)

Type: int

property country_code: str | None
ISO 3166-1 alpha-2 country code of the transaction

Type: str

property currency_code: str | None
Three-letter ISO currency code representing the currency for the amount

Type: str

property hide: List[str] | None
Allows you to hide elements from the response, reducing the amount of data that needs to be returned to your client. Possible options are:
  • fields - Do not return any data on fields of the payment product

  • accountsOnFile - Do not return any accounts on file data

  • translations - Do not return any label texts associated with the payment products

  • productsWithoutFields - Do not return products that require any additional data to be captured

  • productsWithoutInstructions - Do not return products that show instructions

  • productsWithRedirects - Do not return products that require a redirect to a third party. Note that products that involve potential redirects related to 3D Secure authentication are not hidden

Type: list[str]

property is_recurring: bool | None
This allows you to filter payment products based on their support for recurring payments.
  • true - return only payment products that support recurring payments,

  • false - return all payment products that support one-time transactions. Payment products that support recurring products are usually also part of this list.

Type: bool

property locale: str | None
Deprecated: This field has no effect.

Type: str

Deprecated; This field has no effect.

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.productgroups.get_product_groups_params.GetProductGroupsParams[source]

Bases: ParamRequest

Query parameters for Get product groups

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetProductGroupsParams__amount': typing.Optional[int], '_GetProductGroupsParams__country_code': typing.Optional[str], '_GetProductGroupsParams__currency_code': typing.Optional[str], '_GetProductGroupsParams__hide': typing.Optional[typing.List[str]], '_GetProductGroupsParams__is_recurring': typing.Optional[bool], '_GetProductGroupsParams__locale': typing.Optional[str], '__amount': 'Optional[int]', '__country_code': 'Optional[str]', '__currency_code': 'Optional[str]', '__hide': 'Optional[List[str]]', '__is_recurring': 'Optional[bool]', '__locale': 'Optional[str]'}
add_hide(value: str) None[source]
Parameters:

value – str

property amount: int | None
Whole amount in cents (not containing any decimals)

Type: int

property country_code: str | None
ISO 3166-1 alpha-2 country code of the transaction

Type: str

property currency_code: str | None
Three-letter ISO currency code representing the currency for the amount

Type: str

property hide: List[str] | None
Allows you to hide elements from the response, reducing the amount of data that needs to be returned to your client. Possible options are:
  • fields - Do not return any data on fields of the payment product

  • accountsOnFile - Do not return any accounts on file data

  • translations - Do not return any label texts associated with the payment products

  • productsWithoutFields - Do not return products that require any additional data to be captured

  • productsWithoutInstructions - Do not return products that show instructions

  • productsWithRedirects - Do not return products that require a redirect to a third party. Note that products that involve potential redirects related to 3D Secure authentication are not hidden

Type: list[str]

property is_recurring: bool | None
This allows you to filter payment products based on their support for recurring payments.
  • true - return only payment products that support recurring payments,

  • false - return all payment products that support one-time transactions. Payment products that support recurring products are usually also part of this list.

Type: bool

property locale: str | None
Deprecated: This field has no effect.

Type: str

Deprecated; This field has no effect.

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.productgroups.i_product_groups_client.IProductGroupsClient[source]

Bases: ABC

ProductGroups client interface. Thread-safe.

__abstractmethods__ = frozenset({'get_product_group', 'get_product_groups'})
__annotations__ = {}
abstractmethod get_product_group(payment_product_group_id: str, query: GetProductGroupParams, context: CallContext | None = None) PaymentProductGroup[source]

Resource /v2/{merchantId}/productgroups/{paymentProductGroupId} - Get product group

Parameters:
Returns:

onlinepayments.sdk.domain.payment_product_group.PaymentProductGroup

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_product_groups(query: GetProductGroupsParams, context: CallContext | None = None) GetPaymentProductGroupsResponse[source]

Resource /v2/{merchantId}/productgroups - Get product groups

Parameters:
Returns:

onlinepayments.sdk.domain.get_payment_product_groups_response.GetPaymentProductGroupsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.productgroups.product_groups_client.ProductGroupsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IProductGroupsClient

ProductGroups client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

get_product_group(payment_product_group_id: str, query: GetProductGroupParams, context: CallContext | None = None) PaymentProductGroup[source]

Resource /v2/{merchantId}/productgroups/{paymentProductGroupId} - Get product group

Parameters:
Returns:

onlinepayments.sdk.domain.payment_product_group.PaymentProductGroup

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_product_groups(query: GetProductGroupsParams, context: CallContext | None = None) GetPaymentProductGroupsResponse[source]

Resource /v2/{merchantId}/productgroups - Get product groups

Parameters:
Returns:

onlinepayments.sdk.domain.get_payment_product_groups_response.GetPaymentProductGroupsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.products.get_payment_product_networks_params.GetPaymentProductNetworksParams[source]

Bases: ParamRequest

Query parameters for Get payment product networks

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetPaymentProductNetworksParams__amount': typing.Optional[int], '_GetPaymentProductNetworksParams__country_code': typing.Optional[str], '_GetPaymentProductNetworksParams__currency_code': typing.Optional[str], '_GetPaymentProductNetworksParams__is_recurring': typing.Optional[bool], '__amount': 'Optional[int]', '__country_code': 'Optional[str]', '__currency_code': 'Optional[str]', '__is_recurring': 'Optional[bool]'}
property amount: int | None
Amount in cents and always having 2 decimals

Type: int

property country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

property currency_code: str | None
Three-letter ISO currency code representing the currency for the amount

Type: str

property is_recurring: bool | None
This allows you to filter networks based on their support for recurring or not
  • true

  • false

Type: bool

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.products.get_payment_product_params.GetPaymentProductParams[source]

Bases: ParamRequest

Query parameters for Get payment product

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetPaymentProductParams__amount': typing.Optional[int], '_GetPaymentProductParams__country_code': typing.Optional[str], '_GetPaymentProductParams__currency_code': typing.Optional[str], '_GetPaymentProductParams__hide': typing.Optional[typing.List[str]], '_GetPaymentProductParams__is_recurring': typing.Optional[bool], '_GetPaymentProductParams__locale': typing.Optional[str], '__amount': 'Optional[int]', '__country_code': 'Optional[str]', '__currency_code': 'Optional[str]', '__hide': 'Optional[List[str]]', '__is_recurring': 'Optional[bool]', '__locale': 'Optional[str]'}
add_hide(value: str) None[source]
Parameters:

value – str

property amount: int | None
Whole amount in cents (not containing any decimals)

Type: int

property country_code: str | None
ISO 3166-1 alpha-2 country code of the transaction

Type: str

property currency_code: str | None
Three-letter ISO currency code representing the currency for the amount

Type: str

property hide: List[str] | None
Allows you to hide elements from the response, reducing the amount of data that needs to be returned to your client. Possible options are:
  • fields - Do not return any data on fields of the payment product

  • accountsOnFile - Do not return any accounts on file data

  • translations - Do not return any label texts associated with the payment products

  • productsWithoutFields - Do not return products that require any additional data to be captured

  • productsWithoutInstructions - Do not return products that show instructions

  • productsWithRedirects - Do not return products that require a redirect to a third party. Note that products that involve potential redirects related to 3D Secure authentication are not hidden

Type: list[str]

property is_recurring: bool | None
This allows you to filter payment products based on their support for recurring payments.
  • true - return only payment products that support recurring payments,

  • false - return all payment products that support one-time transactions. Payment products that support recurring products are usually also part of this list.

Type: bool

property locale: str | None
Locale used in the GUI towards the consumer.

Type: str

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.products.get_payment_products_params.GetPaymentProductsParams[source]

Bases: ParamRequest

Query parameters for Get payment products

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetPaymentProductsParams__amount': typing.Optional[int], '_GetPaymentProductsParams__country_code': typing.Optional[str], '_GetPaymentProductsParams__currency_code': typing.Optional[str], '_GetPaymentProductsParams__hide': typing.Optional[typing.List[str]], '_GetPaymentProductsParams__is_recurring': typing.Optional[bool], '_GetPaymentProductsParams__locale': typing.Optional[str], '__amount': 'Optional[int]', '__country_code': 'Optional[str]', '__currency_code': 'Optional[str]', '__hide': 'Optional[List[str]]', '__is_recurring': 'Optional[bool]', '__locale': 'Optional[str]'}
add_hide(value: str) None[source]
Parameters:

value – str

property amount: int | None
Whole amount in cents (not containing any decimals)

Type: int

property country_code: str | None
ISO 3166-1 alpha-2 country code of the transaction

Type: str

property currency_code: str | None
Three-letter ISO currency code representing the currency for the amount

Type: str

property hide: List[str] | None
Allows you to hide elements from the response, reducing the amount of data that needs to be returned to your client. Possible options are:
  • fields - Do not return any data on fields of the payment product

  • accountsOnFile - Do not return any accounts on file data

  • translations - Do not return any label texts associated with the payment products

  • productsWithoutFields - Do not return products that require any additional data to be captured

  • productsWithoutInstructions - Do not return products that show instructions

  • productsWithRedirects - Do not return products that require a redirect to a third party. Note that products that involve potential redirects related to 3D Secure authentication are not hidden

Type: list[str]

property is_recurring: bool | None
This allows you to filter payment products based on their support for recurring payments.
  • true - return only payment products that support recurring payments,

  • false - return all payment products that support one-time transactions. Payment products that support recurring products are usually also part of this list.

Type: bool

property locale: str | None
Locale used in the GUI towards the consumer.

Type: str

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.products.get_product_directory_params.GetProductDirectoryParams[source]

Bases: ParamRequest

Query parameters for Get payment product directory

__abstractmethods__ = frozenset({})
__annotations__ = {'_GetProductDirectoryParams__country_code': typing.Optional[str], '_GetProductDirectoryParams__currency_code': typing.Optional[str], '__country_code': 'Optional[str]', '__currency_code': 'Optional[str]'}
property country_code: str | None
ISO 3166-1 alpha-2 country code

Type: str

property currency_code: str | None
Three-letter ISO currency code representing the currency of the transaction

Type: str

to_request_parameters() List[RequestParam][source]
Returns:

list[RequestParam]

class onlinepayments.sdk.merchant.products.i_products_client.IProductsClient[source]

Bases: ABC

Products client interface. Thread-safe.

__abstractmethods__ = frozenset({'get_payment_product', 'get_payment_product_networks', 'get_payment_products', 'get_product_directory'})
__annotations__ = {}
abstractmethod get_payment_product(payment_product_id: int, query: GetPaymentProductParams, context: CallContext | None = None) PaymentProduct[source]

Resource /v2/{merchantId}/products/{paymentProductId} - Get payment product

Parameters:
Returns:

onlinepayments.sdk.domain.payment_product.PaymentProduct

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_payment_product_networks(payment_product_id: int, query: GetPaymentProductNetworksParams, context: CallContext | None = None) PaymentProductNetworksResponse[source]

Resource /v2/{merchantId}/products/{paymentProductId}/networks - Get payment product networks

Parameters:
Returns:

onlinepayments.sdk.domain.payment_product_networks_response.PaymentProductNetworksResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_payment_products(query: GetPaymentProductsParams, context: CallContext | None = None) GetPaymentProductsResponse[source]

Resource /v2/{merchantId}/products - Get payment products

Parameters:
Returns:

onlinepayments.sdk.domain.get_payment_products_response.GetPaymentProductsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_product_directory(payment_product_id: int, query: GetProductDirectoryParams, context: CallContext | None = None) ProductDirectory[source]

Resource /v2/{merchantId}/products/{paymentProductId}/directory - Get payment product directory

Parameters:
Returns:

onlinepayments.sdk.domain.product_directory.ProductDirectory

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.products.products_client.ProductsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IProductsClient

Products client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

get_payment_product(payment_product_id: int, query: GetPaymentProductParams, context: CallContext | None = None) PaymentProduct[source]

Resource /v2/{merchantId}/products/{paymentProductId} - Get payment product

Parameters:
Returns:

onlinepayments.sdk.domain.payment_product.PaymentProduct

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_payment_product_networks(payment_product_id: int, query: GetPaymentProductNetworksParams, context: CallContext | None = None) PaymentProductNetworksResponse[source]

Resource /v2/{merchantId}/products/{paymentProductId}/networks - Get payment product networks

Parameters:
Returns:

onlinepayments.sdk.domain.payment_product_networks_response.PaymentProductNetworksResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_payment_products(query: GetPaymentProductsParams, context: CallContext | None = None) GetPaymentProductsResponse[source]

Resource /v2/{merchantId}/products - Get payment products

Parameters:
Returns:

onlinepayments.sdk.domain.get_payment_products_response.GetPaymentProductsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_product_directory(payment_product_id: int, query: GetProductDirectoryParams, context: CallContext | None = None) ProductDirectory[source]

Resource /v2/{merchantId}/products/{paymentProductId}/directory - Get payment product directory

Parameters:
Returns:

onlinepayments.sdk.domain.product_directory.ProductDirectory

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.refunds.i_refunds_client.IRefundsClient[source]

Bases: ABC

Refunds client interface. Thread-safe.

__abstractmethods__ = frozenset({'get_refunds'})
__annotations__ = {}
abstractmethod get_refunds(payment_id: str, context: CallContext | None = None) RefundsResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/refunds - Get refunds of payment

Parameters:
Returns:

onlinepayments.sdk.domain.refunds_response.RefundsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.refunds.refunds_client.RefundsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IRefundsClient

Refunds client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

get_refunds(payment_id: str, context: CallContext | None = None) RefundsResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/refunds - Get refunds of payment

Parameters:
Returns:

onlinepayments.sdk.domain.refunds_response.RefundsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.services.i_services_client.IServicesClient[source]

Bases: ABC

Services client interface. Thread-safe.

__abstractmethods__ = frozenset({'get_dcc_rate_inquiry', 'get_iin_details', 'surcharge_calculation', 'test_connection'})
__annotations__ = {}
abstractmethod get_dcc_rate_inquiry(body: CurrencyConversionRequest, context: CallContext | None = None) CurrencyConversionResponse[source]

Resource /v2/{merchantId}/services/dccrate - Get currency conversion quote

Parameters:
Returns:

onlinepayments.sdk.domain.currency_conversion_response.CurrencyConversionResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_iin_details(body: GetIINDetailsRequest, context: CallContext | None = None) GetIINDetailsResponse[source]

Resource /v2/{merchantId}/services/getIINdetails - Get IIN details

Parameters:
Returns:

onlinepayments.sdk.domain.get_iin_details_response.GetIINDetailsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod surcharge_calculation(body: CalculateSurchargeRequest, context: CallContext | None = None) CalculateSurchargeResponse[source]

Resource /v2/{merchantId}/services/surchargecalculation - Surcharge Calculation

Parameters:
Returns:

onlinepayments.sdk.domain.calculate_surcharge_response.CalculateSurchargeResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod test_connection(context: CallContext | None = None) TestConnection[source]

Resource /v2/{merchantId}/services/testconnection - Test connection

Parameters:

contextonlinepayments.sdk.call_context.CallContext

Returns:

onlinepayments.sdk.domain.test_connection.TestConnection

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.services.services_client.ServicesClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IServicesClient

Services client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

get_dcc_rate_inquiry(body: CurrencyConversionRequest, context: CallContext | None = None) CurrencyConversionResponse[source]

Resource /v2/{merchantId}/services/dccrate - Get currency conversion quote

Parameters:
Returns:

onlinepayments.sdk.domain.currency_conversion_response.CurrencyConversionResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_iin_details(body: GetIINDetailsRequest, context: CallContext | None = None) GetIINDetailsResponse[source]

Resource /v2/{merchantId}/services/getIINdetails - Get IIN details

Parameters:
Returns:

onlinepayments.sdk.domain.get_iin_details_response.GetIINDetailsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

surcharge_calculation(body: CalculateSurchargeRequest, context: CallContext | None = None) CalculateSurchargeResponse[source]

Resource /v2/{merchantId}/services/surchargecalculation - Surcharge Calculation

Parameters:
Returns:

onlinepayments.sdk.domain.calculate_surcharge_response.CalculateSurchargeResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

test_connection(context: CallContext | None = None) TestConnection[source]

Resource /v2/{merchantId}/services/testconnection - Test connection

Parameters:

contextonlinepayments.sdk.call_context.CallContext

Returns:

onlinepayments.sdk.domain.test_connection.TestConnection

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.sessions.i_sessions_client.ISessionsClient[source]

Bases: ABC

Sessions client interface. Thread-safe.

__abstractmethods__ = frozenset({'create_session'})
__annotations__ = {}
abstractmethod create_session(body: SessionRequest, context: CallContext | None = None) SessionResponse[source]

Resource /v2/{merchantId}/sessions - Create session

Parameters:
Returns:

onlinepayments.sdk.domain.session_response.SessionResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.sessions.sessions_client.SessionsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, ISessionsClient

Sessions client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

create_session(body: SessionRequest, context: CallContext | None = None) SessionResponse[source]

Resource /v2/{merchantId}/sessions - Create session

Parameters:
Returns:

onlinepayments.sdk.domain.session_response.SessionResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.subsequent.i_subsequent_client.ISubsequentClient[source]

Bases: ABC

Subsequent client interface. Thread-safe.

__abstractmethods__ = frozenset({'subsequent_payment'})
__annotations__ = {}
abstractmethod subsequent_payment(payment_id: str, body: SubsequentPaymentRequest, context: CallContext | None = None) SubsequentPaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment

Parameters:
Returns:

onlinepayments.sdk.domain.subsequent_payment_response.SubsequentPaymentResponse

Raises:
  • DeclinedPaymentException – if the payment platform declined / rejected the payment. The payment result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.subsequent.subsequent_client.SubsequentClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, ISubsequentClient

Subsequent client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

subsequent_payment(payment_id: str, body: SubsequentPaymentRequest, context: CallContext | None = None) SubsequentPaymentResponse[source]

Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment

Parameters:
Returns:

onlinepayments.sdk.domain.subsequent_payment_response.SubsequentPaymentResponse

Raises:
  • DeclinedPaymentException – if the payment platform declined / rejected the payment. The payment result will be available from the exception.

  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.tokens.i_tokens_client.ITokensClient[source]

Bases: ABC

Tokens client interface. Thread-safe.

__abstractmethods__ = frozenset({'create_token', 'delete_token', 'get_token'})
__annotations__ = {}
abstractmethod create_token(body: CreateTokenRequest, context: CallContext | None = None) CreatedTokenResponse[source]

Resource /v2/{merchantId}/tokens - Create token

Parameters:
Returns:

onlinepayments.sdk.domain.created_token_response.CreatedTokenResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod delete_token(token_id: str, context: CallContext | None = None) None[source]

Resource /v2/{merchantId}/tokens/{tokenId} - Delete token

Parameters:
Returns:

None

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod get_token(token_id: str, context: CallContext | None = None) TokenResponse[source]

Resource /v2/{merchantId}/tokens/{tokenId} - Get token

Parameters:
Returns:

onlinepayments.sdk.domain.token_response.TokenResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.tokens.tokens_client.TokensClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, ITokensClient

Tokens client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

create_token(body: CreateTokenRequest, context: CallContext | None = None) CreatedTokenResponse[source]

Resource /v2/{merchantId}/tokens - Create token

Parameters:
Returns:

onlinepayments.sdk.domain.created_token_response.CreatedTokenResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

delete_token(token_id: str, context: CallContext | None = None) None[source]

Resource /v2/{merchantId}/tokens/{tokenId} - Delete token

Parameters:
Returns:

None

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

get_token(token_id: str, context: CallContext | None = None) TokenResponse[source]

Resource /v2/{merchantId}/tokens/{tokenId} - Get token

Parameters:
Returns:

onlinepayments.sdk.domain.token_response.TokenResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.webhooks.i_webhooks_client.IWebhooksClient[source]

Bases: ABC

Webhooks client interface. Thread-safe.

__abstractmethods__ = frozenset({'send_test_webhook', 'validate_webhook_credentials'})
__annotations__ = {}
abstractmethod send_test_webhook(body: SendTestRequest, context: CallContext | None = None) None[source]

Resource /v2/{merchantId}/webhooks/sendtest - Send test

Parameters:
Returns:

None

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

abstractmethod validate_webhook_credentials(body: ValidateCredentialsRequest, context: CallContext | None = None) ValidateCredentialsResponse[source]

Resource /v2/{merchantId}/webhooks/validateCredentials - Validate credentials

Parameters:
Returns:

onlinepayments.sdk.domain.validate_credentials_response.ValidateCredentialsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

class onlinepayments.sdk.merchant.webhooks.webhooks_client.WebhooksClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]

Bases: ApiResource, IWebhooksClient

Webhooks client. Thread-safe.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]
Parameters:
  • parentonlinepayments.sdk.api_resource.ApiResource

  • path_context – Mapping[str, str]

send_test_webhook(body: SendTestRequest, context: CallContext | None = None) None[source]

Resource /v2/{merchantId}/webhooks/sendtest - Send test

Parameters:
Returns:

None

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error

validate_webhook_credentials(body: ValidateCredentialsRequest, context: CallContext | None = None) ValidateCredentialsResponse[source]

Resource /v2/{merchantId}/webhooks/validateCredentials - Validate credentials

Parameters:
Returns:

onlinepayments.sdk.domain.validate_credentials_response.ValidateCredentialsResponse

Raises:
  • IdempotenceException – if an idempotent request caused a conflict (HTTP status code 409)

  • ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)

  • AuthorizationException – if the request was not allowed (HTTP status code 403)

  • ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)

  • PlatformException – if something went wrong at the payment platform, the payment platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

  • ApiException – if the payment platform returned any other error